Class RetryInvokeExample
java.lang.Object
software.amazon.lambda.durable.DurableHandler<GreetingRequest,String>
software.amazon.lambda.durable.examples.invoke.RetryInvokeExample
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
Example demonstrating
context.withRetry with context.invoke.
Retries a chained Lambda invocation up to 3 times with a fixed 2-second backoff between attempts. Each attempt
uses a unique operation name ("call-greeting-1", "call-greeting-2", etc.) so the execution history
stays clean and replay-safe.
A null name is used, so attempts are grouped under a default-named child context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleRequest(GreetingRequest input, DurableContext context) Handle the durable execution.Methods inherited from class software.amazon.lambda.durable.DurableHandler
createConfiguration, getConfiguration, handleRequest
-
Constructor Details
-
RetryInvokeExample
public RetryInvokeExample()
-
-
Method Details
-
handleRequest
Description copied from class:DurableHandlerHandle the durable execution.- Specified by:
handleRequestin classDurableHandler<GreetingRequest,String> - Parameters:
input- User inputcontext- Durable context for operations- Returns:
- Result
-