Amazon SQS FIFO Queue send message validation

0 votes

I am working on using amazon's fifo queue and when I send a message I would like to know if the item was added with my call, or if the message was already in the queue and it just returned true

Sep 7, 2018 in AWS by bug_seeker
• 14,970 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Assuming you only have one process adding messages to the queue, just keep track of the sequenceNumber from the result (ie: add it to a Set) - once you have X unique sequenceNumbers, you're set (no pun intended).

If you have multiple processes adding messages, you'll need to either

  1. ensure the messages sent by each process are unique (and thus can use the same mechanism as single process), or
  2. use some mechanism of sharing information between processes
    • doing this option properly is likely more expensive than it's worth, and I'd strongly suggest either designing for option 1, or revisiting the requirement that each process sends exactly X unique messages, especially if "approximately X" is good enough.
answered Sep 7, 2018 by Priyaj
• 56,120 points

Related Questions In AWS

0 votes
1 answer

Polling the queue in Amazon SQS

One way is you could create a ...READ MORE

answered Dec 20, 2018 in AWS by Archana
• 5,280 points
0 votes
1 answer

How to enable Amazon Simple Queue Service (SQS)

Please follow the below steps in order ...READ MORE

answered Dec 28, 2018 in AWS by Shuvodip
+1 vote
5 answers

Can Celery be used with Amazon SQS

I regenerated the credentials in the IAM ...READ MORE

answered Oct 25, 2018 in AWS by triedntested
0 votes
1 answer

What is the difference between Amazon SNS and Amazon SQS?

SNS is a distributed publish-subscribe system and the messages are pushed to ...READ MORE

answered Jul 30, 2018 in AWS by Mrunal
• 680 points
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I roll-back a message to Amazon MQ (AMQ) from Lambda?

It is apparently not possible using STOMP ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,120 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.