This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
AWS SNS: Add SNS FIFO queues support to NotificationMessagingTemplate: set PublishRequest.messageGroupId and PublishRequest.messageDeduplicationId #777
Labels
In
QueueMessageChannel#prepareSendMessageRequest
, there is a special handling ofSqsMessageHeaders.SQS_GROUP_ID_HEADER
andSqsMessageHeaders.SQS_DEDUPLICATION_ID_HEADER
set in theMessage#headers
map. This allows us to send a message to a FIFO queue.However, there is no special handling of these headers in
TopicMessageChannel
, which leads to this exception, when we try to publish to a FIFO SNS queue:We need to add the same handling and set the values of special headers to
PublishRequest#messageGroupId
andPublishRequest#messageDeduplicationId
.When I do it via pure AWS SDK (
publishRequest.setMessageGroupId
,publishRequest.setMessageDeduplicationId
), the publishing to the same SNS topic is working.The text was updated successfully, but these errors were encountered: