davsclaus opened a new pull request, #30438: URL: https://github.com/apache/camel/pull/30438
## Description [CAMEL-27178](https://issues.apache.org/jira/browse/CAMEL-27178): `invokeFunction` always invoked the function synchronously (`InvocationType=RequestResponse`, the SDK default). An asynchronous (`Event`) or `DryRun` invocation needed `pojoRequest=true` and an `InvokeRequest` built in Java. `CamelAwsLambdaLogResult` was always empty too, because `LogType=Tail` could not be set. - New producer option `invocationType` (`RequestResponse`, `Event`, `DryRun`; default `RequestResponse`), and the header `CamelAwsLambdaInvocationType`, which overrides it per message. - New producer option `logType` (`None`, `Tail`; default `None`), and the header `CamelAwsLambdaLogType`, which overrides it per message. With `Tail`, `CamelAwsLambdaLogResult` holds the last 4 KB of the log, base64-encoded as Lambda returns it. - `Event` answers with status code 202 and an empty payload. The body is then an empty string, and a missing payload no longer risks an NPE. - The defaults are those of Lambda, so existing routes send the same request. With `pojoRequest=true`, the `InvokeRequest` body is sent as it is. - The header descriptions are updated (status codes per type, base64 log). There is a new paragraph and example in the component doc. The catalog, its doc copy and the DSLs are regenerated. Needed for asynchronous invocation in the `aws-lambda-sink` Kamelet (apache/camel-kamelets#3280). ## Tests `LambdaProducerInvocationTypeTest` checks the `InvokeRequest` that the client mock receives, and the reply headers: - the defaults (`RequestResponse`, `None`) - `Event` from the option (202, empty body) - the header (`DryRun`) overriding the option - `Tail` from the option and from the header, with `CamelAwsLambdaLogResult` set All 93 unit tests of the module pass. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
