Overview
This is a working document for investigating stuck messages in RabbitMQ queue.
Key points
Unacked Messages are "unacknowledged messages". It's a message that is sent to but not successfully completed and just got stuck in the processing.
Stuck Message (Sample)
RabbitMQ Message is stuck in unacked
Steps for Investigation and Releasing of Unacked Message
1. Stop the AtriaProvisioningService. This will put back the stuck message on "Ready" status
2. Run SQL Profiler on the Database Server, this will help us see what will be processed
3. Start the AtriaProvisioningService. This will then try to re-run the message that got stuck.
4. Review the SQL Profiler tracing to see what is the action it was trying to do. It might give a clue on the reason why it's not being processed. Take note of it as we will skip the stuck message on the next step.
5. Again, stop the AtriaProvisioningService.
6. In RabbitMQ, open the queue that has a stuck message
7. Set the Ack Mode to "Automatic ack"; Messages: "1"
8. Click on Get Message(s). This will automatically acknowledge the 1st message on the queue which is the one getting stuck.
9. Start AtriaProvisioningService. This will then continue to process the other messages.
Note:
If there is a stuck message again, just repeat the steps.
For the manually acknowledged message, the Provisioning Request Log will still show it as "In Progress" on the logs, this is for further investigation as needed.
As the review on the provisioning requests are done, there is a need to reprovision for skipped messages.