Class ParallelExample

java.lang.Object
software.amazon.lambda.durable.DurableHandler<ParallelExample.Input,ParallelExample.Output>
software.amazon.lambda.durable.examples.parallel.ParallelExample
All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler

public class ParallelExample extends DurableHandler<ParallelExample.Input,ParallelExample.Output>
Example demonstrating parallel branch execution with the Durable Execution SDK.

This handler processes a list of items concurrently using context.parallel():

  1. Each item is processed in its own branch (child context)
  2. All branches run concurrently and their results are collected
  3. A final step combines the results into a summary

The ParallelDurableFuture implements AutoCloseable, so try-with-resources guarantees join() is called even if an exception occurs.