Skip to main content
Matrix42 Self-Service Help Center

RabbitMQ Troubleshooting

Summary

This document describes additional information on RabbitMQ for troubleshooting purposes.

Connecting to the management interface

By using the automated installation, the management interface is automatically installed and configured. It can only be accessed via localhost on the server by default.

http://localhost:15672/#/

Maintenance Tasks

Removing a queue

A queue can be deleted from the RabbitMQ Management Interface. Go to the queue tab and go to the bottom of the page. You will find a dropdown "Delete / Purge". Press Delete on the left side of the interface to delete the queue.

Removing messages from a queue

Messages can be purged. I a queue has no subscriber it stores all messages until the configured time to live (TTL) for the message is reached. To delete all messages in a queue open the desired queue and click the "Purge Messages" button. All messages of this queue are deleted after confirmation.

Troubleshooting

Collect messages in a "Wire tap"

In order to analyze messages it might be useful to temporarily store all incoming messages in a "Wire Tap". Usually all subscribers will remove all messages almost immediately and therefore the messages cannot be reviewed. To store messages temporary it is possible to create a temporary queue within the exchange which receives all messages. This queue has no subscriber and should be configured for automated message deletion.

In the administration interface of RabbitMQ

  • Select Queues
  • Expand "Add Queue" below the list of queues
  • Select the Virtual host used during installation
  • Enter a name i.e. temp.queue
  • Click in "Message TTL" in the list of optional arguments to add "x-message-ttl"
  • Enter the time how long messages should be stored in milliseconds i.e. 86400000 for 1 day
  • New messages should now also received in the new queue and can be viewed as described above
  • When done with troubleshooting it is safe to delete the temp.queue

When start troubleshooting it might make sense to purge the temporary queue before invoking the task in one of the systems you want to inspect.

If message processing stops after 30 minutes

With RabbitMQ version 3.8.15 onwards there is a new timeout when a node is not acknowledging messages in time. The default timeout is set to 30 minutes. This can happen when the message delivery is a lot higher than the processing.

To disable this timeout add this to the advanced.config file: 

%APPDATA%\RabbitMQ\ %APPDATA%\RabbitMQ\rabbitmq.conf,%APPDATA%\RabbitMQ\advanced.config
%% advanced.config
[
  {rabbit, [
    {consumer_timeout, undefined}
  ]}
].

 After this the RabbitMQ server needs to restart. Beware - if the queues were not created as durable the messages get lost!

FAQ

Are messages persistent and survive a Server/RabbitMQ Service Restart?

By default the messages are processed and removed. The default queue setting is persistant and restarting the service will remove all unprocessed messages.

Firewall Settings

Firewall settings - which Ports are used by RabbitMQ

  • 5672, 5671: used by the protocol AMQP 0-9-1 and 1.0 clients with and without TLS
  • 15672: HTTP API clients, management UI and rabbitmqadmin (only if the management plugin is enabled)
  • Was this article helpful?