Open pulsar-gupta opened 10 months ago
Hey @pulsar-gupta , we have open PR for this it is known issue.
with some changes I was able to resolve the issue first step was to upgrade the spring boot and spring cloud version
second step was to register hints
MyListener class is where I have @SqsListener method 'recieveMessage' to receive and process the messages from queue
@Override public void registerHints(RuntimeHints hints, ClassLoader classLoader) { // Register method for reflection Method sqsReceiveMethod = ReflectionUtils.findMethod(MyListener.class, "recieveMessage", Message.class); hints.reflection().registerMethod(sqsReceiveMethod, ExecutableMode.INVOKE); hints.resources().registerPattern("io/awspring/cloud/core/SpringCloudClientConfiguration.properties"); }
and created image mvn -Pnative spring-boot:build-image
Now works absolutely fine
Type: Bug
Component: SQS
Describe the bug
I have an application and it reads messages from sqs when run locally but as soon as I deploy it's native image on EKS nothing happens and messages are queued on SQS. It looks as is my native image is not reading messages from SQS. No logs are printed and no exception.
Here is my code:
@Configuration public class ReaderConfiguration {
} @Component public class SQSListner {
}
image is build using mvn -Pnative spring-boot:build-image