0

is there anyone who had a similar issue that the SQS Listener is picking the same message twice.

Scenario:

  1. I send the SQS message on the queue
  2. I receive that message in javax.jms.Message format
  3. I process the message
  4. I acknowledge the message

In most cases, the acknowledge function works just fine and it deletes the message but there are cases where the listener is picking that message twice in a row...

My question would be, is there some way I can make sure that the message won't be picked twice?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
careful
  • 69
  • 8
  • I'm using the Standard queue, not the FIFO. The option where I create the custom list where I would keep the message ids and check the duplicates in that way would probably work, but I'm looking for a better solution if there is one... Thanks – careful Jan 25 '21 at 21:50
  • 1
    You're options are to keep a list and check for duplicates, or code your application in a way that it just doesn't care if duplicate messages are processed (idempotence), or switch to a FIFO queue. – Mark B Jan 25 '21 at 21:54

0 Answers0