-
-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
component: sqsSQS integration related issueSQS integration related issuestatus: ideal-for-contributionWe agree it's nice to have but it is not team priorityWe agree it's nice to have but it is not team prioritytype: enhancementSmaller enhancement in existing integrationSmaller enhancement in existing integration
Description
What: Add auto-configuration for AcknowledgementResultCallback and AsyncAcknowledgementResultCallback in the default SQS listener container factory.
Why: We already auto-configure MessageInterceptor(s) and ErrorHandler (blocking + async). The callbacks are the remaining extension points that still require manual wiring.
Where: SqsAutoConfiguration#defaultSqsListenerContainerFactory
Lines 119 to 145 in 88417a0
| public SqsMessageListenerContainerFactory<Object> defaultSqsListenerContainerFactory( | |
| ObjectProvider<SqsAsyncClient> sqsAsyncClient, ObjectProvider<AsyncErrorHandler<Object>> asyncErrorHandler, | |
| ObjectProvider<ErrorHandler<Object>> errorHandler, | |
| ObjectProvider<AsyncMessageInterceptor<Object>> asyncInterceptors, | |
| ObjectProvider<ObservationRegistry> observationRegistry, | |
| ObjectProvider<SqsListenerObservation.Convention> observationConventionProvider, | |
| ObjectProvider<MessageInterceptor<Object>> interceptors, | |
| ObjectProvider<JacksonMessageConverterMigration> messageConverterFactory, | |
| MessagingMessageConverter<?> messagingMessageConverter) { | |
| SqsMessageListenerContainerFactory<Object> factory = new SqsMessageListenerContainerFactory<>(); | |
| factory.configure(this::configureProperties); | |
| sqsAsyncClient.ifAvailable(factory::setSqsAsyncClient); | |
| asyncErrorHandler.ifAvailable(factory::setErrorHandler); | |
| errorHandler.ifAvailable(factory::setErrorHandler); | |
| interceptors.forEach(factory::addMessageInterceptor); | |
| asyncInterceptors.forEach(factory::addMessageInterceptor); | |
| messageConverterFactory.ifAvailable(mcf -> mcf.configureLegacyObjectMapper(messagingMessageConverter)); | |
| if (this.sqsProperties.isObservationEnabled()) { | |
| observationRegistry | |
| .ifAvailable(registry -> factory.configure(options -> options.observationRegistry(registry))); | |
| observationConventionProvider | |
| .ifAvailable(convention -> factory.configure(options -> options.observationConvention(convention))); | |
| } | |
| factory.configure(options -> options.messageConverter(messagingMessageConverter)); | |
| return factory; | |
| } |
Tests: Add or update tests to cover both callback variants and their absence.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component: sqsSQS integration related issueSQS integration related issuestatus: ideal-for-contributionWe agree it's nice to have but it is not team priorityWe agree it's nice to have but it is not team prioritytype: enhancementSmaller enhancement in existing integrationSmaller enhancement in existing integration