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 réponses
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.

répondu il y a 4 mois
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
EXPERT
répondu il y a 4 mois
profile picture
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions