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 個月前檢視次數 201 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南