spring-cloud-aws
spring-cloud-aws copied to clipboard
MessagingTemplates adding channel interceptors to internally resolved MessageChannel instances
It would be great if we could set channel interceptors somehow when destinations are resolved to MessageChannel
instances inside the QueueMessagingTemplate
and NotificationMessagingTemplate
classes. This way we can apply additional processing before/after messages are sent/received (e.g. encryption/decryption, etc.).
This would also help to integrate aws messaging with spring cloud sleuth. Currently there is no non-invasive way to add tracing to sqs messages.
I'd like to bump this issue. Currently, I'm trying to implement OpenTracing for the SQS listener, but it's iffy to do so via the public APIs.
My current approach is by injecting the SimpleMessageListenerContainer
and decorating the existing QueueMessageHandler
with my own code. After that, I can set the handler on the container, but it feels dirty, and should be possible with an interceptor.