I have a very basic spring-boot (3.3.2) + spring-cloud-stream based app which consumes messages from kinesis stream and prints the payload on console.
The application has a java.util.function.Consumer bean defined to consume the message from kinesis stream.
@Bean
Consumer<Message<byte[]>> consumer() {
return (message) -> {
final byte[] payload = message.getPayload();
System.out.println("PAYLOAD ::::t"+ new String(payload));
};
})
The app works perfectly fine when run as a container or on my IDE. I am trying to deploy the same on aws lambda using ‘spring-cloud-function-adapter-aws’.
I am new to aws and trying to learn. Followed some of the spring-cloud-function app samples and I could deploy them on lambda without any issues and they work as expected, however, I could not find any sample or documentation for deploying the spring cloud stream app on aws lambda.
I could deploy the app on aws lambda, however, when I publish the message on kinesis stream, the app is never receiving any messages.
I found one tutorial but I don’t know how to integrate that with my app.