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. If 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 (default when installed with scripts is "matrix42").
  • 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.
  • Click on "Add queue".
  • Select the new queue in the list of queues.
  • Open the section "Bindings" and add the name of the Binding which was used when installing RabbitMQ (default when installed with scripts is "matrix42.suem.topic").
  • Click on "Bind".
  • New messages should now also received in the new queue and can be viewed as described above.
  • Click on "Get Message(s) to retrieve the messages. The number of retrieved messages can be defined in the field "Messages".
    • The web tool JSON formatter can be used to view the payload of the messages.
  • 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: 

Path for new er versions C:\Program Files\RabbitMQ Server\rabbitmq_server-3.9.X\advanced.config

Path for older version than 3.9

%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!

To control the setting you can check in the log that this entry is there:

  config file(s) : c:/Program Files/RabbitMQ Server/rabbitmq_server-3.9.5/advanced.config

If the Empirum Service Bus Listener does not start

When Empirum and RabbitMQ are installed on the same server the Empirum Service Bus Listener service might fail to start because of timing issues.

Solution: Set the Empirum Service Bus Listener service to "Delayed start" in the Windows soervice manager application.

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?