0

I'm using spring and rabbitmq, with auto-ack. I configured a RetryInterceptor (maxAttempts 2, min and max interval 60 secs., multiplier 1), and a x-message-ttl (125 sec. for this test) is configured in the queue. I have only 1 concurrent consumer.

I put 8 messages that will always fail. In this case, there are some messages that go directly to DLQ without being consumed, but I can't understand the logic and the order behind that.

The sequence that I see is:

Message 1 first attempt

Message 1 second attempt

Message 2 first attempt

Message 2 second attempt

Message 3 first attempt

Message 7 expires

Message 8 expires

Message 3 second attempt

Message 4 first attempt

Message 3 expires

Message 4 second attempt

Message 5 first attempt

Message 4 expires

Message 5 second attempt

Message 5 expires

Message 6 first attempt

Message 6 second attempt

Message 1 third attempt

Message 6 expires

Message 1 fourth attempt

Message 2 third attempt

Message 1 expires

Message 2 third attempt

Message 2 expires

What is the explanation to this order and behavior?

abullor
  • 51
  • 4
  • You need to provide much more information, configuration, logs etc. – Gary Russell Sep 07 '21 at 16:06
  • I'll try to put the entire code... Just a quick general question. maxAttempts overrides TTL? It looks like every message tries 2 times (maxAttemps) and then next message tries the same and so on, but if TTL is not reached, the first message tries 2 times again and so on. – abullor Sep 08 '21 at 13:23
  • They are completely unrelated; TTL is managed by the broker; maxAttempts is about retries; without seeing more information, I can't understand what you are trying to do. – Gary Russell Sep 08 '21 at 14:09

0 Answers0