SNS Fan out to multiple SQS - is there a identifier for same message in the SQS

0

I have two SQS in different regions subscribed to a SNS. When a message that arrives in SNS is sent to both SQS, is there a unique identifier that is identical for the message/event that is in both SQS?

2回答
0

I would recommend you to add message attributes in the SNS message that you are posting for an unique identifier. Also please turn on enable raw message delivery to true for that SNS topic. If it's false(default) the attributes will not be sent to SQS.

回答済み 4ヶ月前
0

Hello.

The message sent from SNS to SQS is as follows.
I think "MessageId" will have the same value even in SQS in different regions.
https://docs.aws.amazon.com/sns/latest/dg/sns-sqs-as-subscriber.html

{
   "Type" : "Notification",
   "MessageId" : "63a3f6b6-d533-4a47-aef9-fcf5cf758c76",
   "TopicArn" : "arn:aws:sns:us-west-2:123456789012:MyTopic",
   "Subject" : "Testing publish to subscribed queues",
   "Message" : "Hello world!",
   "Timestamp" : "2012-03-29T05:12:16.901Z",
   "SignatureVersion" : "1",
   "Signature" : "EXAMPLEnTrFPa3...",
   "SigningCertURL" : "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem",
   "UnsubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:123456789012:MyTopic:c7fe3a54-ab0e-4ec2-88e0-db410a0f2bee"
}
profile picture
エキスパート
回答済み 4ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ