rabbitmq-cli-consumer
rabbitmq-cli-consumer copied to clipboard
Request - Max Retry
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 ?
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?