I have a RabbitMQ server which has around 100 of queues having around 100 messages in each. All the queues has same exchange and individual routing keys. I am using Spring's amqp framework to interact with the RabbitMQ server. I have multiple applications using the same RabbitMQ server (i.e multiple consumers).
The problem I'm facing is that for some particular consumers though the messages are received , the ack is failing i.e I can see some unacknowledged messages in some queues. Now the pickle is that if my application even accidentally receives a duplicate (unacked message i.e a message which has been received previously) message it throws exception and that's what I have started getting for those unacked messages.
But I'm not even sure that when and why I will get an unacked (i.e duplicate)message as I not sure about the priority of the unacked messages. So, can you guys give the solutions for the following problem :
- Even After getting the messages properly why for sometimes only the ack is not successful.
Even if there is no solution of the first problem 1 how I should configure my application so that it should never ever receive an unacked (duplicate) message.
BTW the behavior has not been seen from the very beginning of the creation of the application, it started behaving in this way lately.