Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Cloud AWS SQS - factory properties of @SqsListener are not applied in Native Image. #1040

Open
bgr02 opened this issue Feb 6, 2024 · 0 comments

Comments

@bgr02
Copy link

bgr02 commented Feb 6, 2024

Type: Bug

Component: SQS

Describe the bug
GraalVM: GraalVM for JDK 17 Community 17.0.9
spring-cloud-aws-dependencies : 3.1.0
org.springframework.boot: 3.2.0

In the Native Image, SqsMessageListenerContainerFactory is specified in @SqsListener's factory, but it is ignored.

defaultSqsListenerContainerFactory registered as Bean, but it does not apply to @SqsListener.

Sample

@Bean
public SqsMessageListenerContainerFactory<Object> defaultSqsListenerContainerFactory() {
	return SqsMessageListenerContainerFactory
			.builder()
			.configure (
				options ->
					options.acknowledgementMode (AcknowledgementMode.valueOf ("MANUAL"))
			)
			.sqsAsyncClient(sqsAsyncClient())
			.build();
}

@SqsListener(value = "Test.fifo", factory = "defaultSqsListenerContainerFactory")
public void messageListener(String message, Acknowledgement ack) {
	System.out.println(message);

	ack.acknowledge();
}
@bgr02 bgr02 changed the title factory properties of @SqsListener are not applied in Native Image. Spring Cloud AWS SQS - factory properties of @SqsListener are not applied in Native Image. Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant