spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

Allow providing custom ChannelInterceptor implementations during SNS autoconfiguration

Open sondemar opened this issue 2 years ago • 1 comments

Type: Feature

Is your feature request related to a problem? Please describe. The SnsTemplate instantiates TopicMessageChannel before sending the message when the topic ARN is provided. However, there is no way to apply ChannelInterceptor implementations which can help us to modify the messages before sending out and/or receiving from a Message the channel (for example apply some extra message headers).

Describe the solution you'd like It could be a similar solution to the SqsAutoConfiguration where we can provide MessageInterceptor implementations (in our case it will be ChannelInterceptor implementations with SnsAutoConfiguration).

Describe alternatives you've considered As mentioned above, this kinda interceptor could be used. With AWS SDK v2.x I do not see any alternative for now.

Additional context With aws sdk version 1.x probably it was possible to configure SnsMessageHandler with AmazonSnsClient. Please let me know if you need a contribution to the implementation.

sondemar avatar Dec 06 '22 16:12 sondemar

@sondemar apologies for late reply. You're welcome to contribute a PR.

maciejwalkowiak avatar Mar 01 '23 09:03 maciejwalkowiak