Skip to content
John Bradley edited this page Nov 8, 2017 · 1 revision

Welcome to the bespin-mailer wiki!

Troubleshooting

The following commands will need to be run on the server running rabbitmq.

Rabbitmq Queue Setup

Checking the existence of the queues and getting message counts.

Running this command:

rabbitmqctl list_queues

Should show something like this:

Listing queues ...
...
EmailQueue	0
RetryQueue	0
...

The 0 specifies the number of pending messages.

If there are messages in the queues you can check them by installing python and downloading rabbitmqadmin.

Download rabbitmqadmin:

wget https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/rabbitmq_v3_6_14/bin/rabbitmqadmin

Check the first message in the EmailQueue:

python rabbitmqadmin get queue=EmailQueue requeue=true count=1

Should show something like this:

+-------------+---------------+---------------+------------------------------+---------------+------------------+------------+-------------+
| routing_key |   exchange    | message_count |           payload            | payload_bytes | payload_encoding | properties | redelivered |
+-------------+---------------+---------------+------------------------------+---------------+------------------+------------+-------------+
| SendEmail   | EmailExchange | 41            | ..pickledpayload...           | 28            | string           |            | True        |
+-------------+---------------+---------------+------------------------------+---------------+------------------+------------+-------------+

Rabbitmq Exchange Setup

Checking the existence of the appropriate exchanges.

Running this command:

rabbitmqctl list_exchanges

Should show something like this:

Listing exchanges ...
...
EmailExchange	direct
RetryExchange	direct
...

The second column is the type of exchange.

Clone this wiki locally