enqueue-dev icon indicating copy to clipboard operation
enqueue-dev copied to clipboard

fix: redis redelivery_delay setting does not work

Open compwright opened this issue 1 year ago • 0 comments

When using the redis transport, RedisConsumer::processResult() creates the redelivered record prior to the RedisSubscription callback executing. The subscription callback attached with Enqueue\Consumption\QueueConsumer then invokes RedisConsumer::reject().

Calling acknowledge() here deletes the redelivered record which was created earlier. Thus, we should not create a new record in reject() and we should only call acknowledge() if we do not wish to redeliver.

I have tested and confirmed that this change fixes the issue. However, if there is a better solution, please advise.

Resolves #1342

compwright avatar Mar 18 '24 18:03 compwright