rabbitmq-cli-consumer icon indicating copy to clipboard operation
rabbitmq-cli-consumer copied to clipboard

Request - Max Retry

Open cansozeri opened this issue 5 years ago • 1 comments

Hi,

Is there anyway to add max retry functionality to this consumer like Laravel --tries=3 ?

I think every reject action, consumer can add a property if not exist to the message like "attempts_count" = 1 and if exists, increment like "attempts_count" = 2. This functionality will be great ...

But as I see the project is very dependent on streadway/amqp library, so I think it is not possible to add this on Delivery package in this project right now ?

cansozeri avatar Oct 15 '19 16:10 cansozeri

I think when a message rejected or an error occured - we could send an ack to the RabbitMq server, and push the message payload to the queue with adding a property like "attempts_count" +1.

We can control this property while consuming and throw an error if the max try option has been exceeded which is placed in the configuration file or passed as an argument?

cansozeri avatar Oct 19 '19 06:10 cansozeri