Reputation: 173
I put records from a file into rabbit mq,read records from queue and call a service.For rejected records,I am sending a negative acknowledgemnt and requeuing with channel.basicNack method.But requirement is that we need to make only some 3 attempts of service call.After that we have to remove the message from the queue rather keep on calling the service again and again.
Upvotes: 0
Views: 1166
Reputation: 174494
On the last attempt, set the requeue
argument in basicNack
to false.
Upvotes: 1