spring-cloud-aws
spring-cloud-aws copied to clipboard
Allow providing custom ChannelInterceptor implementations during SNS autoconfiguration
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 apologies for late reply. You're welcome to contribute a PR.