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
• 15,520 points
1,246 views

1 answer to this question.

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
• 58,090 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,640 points
959 views
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
569 views
+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
3,465 views
0 votes
2 answers

What is the difference between Amazon SNS and Amazon SQS?

Amazon SQS and SNS are the two ...READ MORE

answered Sep 9, 2020 in AWS by Michael
• 140 points
3,025 views
0 votes
1 answer
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
• 58,090 points
1,068 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP