rsmq-worker icon indicating copy to clipboard operation
rsmq-worker copied to clipboard

Message goes both to 'exceeded' and 'message'

Open nicolasGab opened this issue 5 years ago • 1 comments

I am using the RSMQ-worker package to handle messages coming from a Redis instance. Main functionalities are triggered on the 'message' event. When I fail to handle a message, it is put back in the Redis queue and the :rc (receive count) key is incremented.

When a message hits an :rc of 10, it goes to a different queue via the 'exceeded' event. The problem is that both the 'message' and the 'exceeded' events are triggered when a message has been received 10 times. This means that I am marking the failed message as up for something else while trying to process it as a normal message. If the tenth retry succeeds, the message is practically duplicated.

Is this expected behaviour? Should I insert extra conditions for exceeded messages?

nicolasGab avatar Nov 06 '19 09:11 nicolasGab

I can confirm this behavior. Do we know what's the problem here?

ketansp avatar Aug 18 '24 18:08 ketansp