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?

已提问 4 个月前202 查看次数
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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则