Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RabbitMQ - Random queues with name "amq.gen-*" getting autogenerated

I have a set up to send messages to durable queues from server (NodeJS) and the client (android app) listens to messages on their respective queues (each android device listens to its corresponding queue which is unique).

As per the RabbitMQ document, when we try to connect to a queue with empty name (i.e "") then RabbitMQ generates a random queue with name starting with "amq.gen-". But, no where from the client or server code I see that I am trying to connect to a queue with empty name but still see lot of random queues getting generated.

Can anyone help me in understanding what other scenarios might create random queues with name "amq.gen-*"?

like image 679
Ayaz Pasha Avatar asked Mar 05 '14 10:03

Ayaz Pasha


People also ask

How do I delete RabbitMQ queue?

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

Can RabbitMQ have multiple queues?

Use multiple queues and consumers Queues are single-threaded in RabbitMQ, and one queue can handle up to about 50 thousand messages. You will achieve better throughput on a multi-core system if you have multiple queues and consumers and if you have as many queues as cores on the underlying node(s).

How do you name a queue in RabbitMQ?

Queues should not merely mimic the name of the routing key. Routing keys are elements of the message, and the queues shouldn't care about that. That's what bindings are for. Queue names should be named after what the consumer attached to the queue will do.


2 Answers

If you are creating queue with blank name a random queue name amq.gen-* will be generated. If you are connecting to queue with blank name then, depending of method, last declared on this channel queue name will be used. If no queue was declared or method doesn't support blank queue name error will be thrown.

See queue.declare method and domain.queue-name domain documentation for details.

like image 142
pinepain Avatar answered Sep 29 '22 16:09

pinepain


RabbitMq generated random name queues(amq.gen-* ) if in the application you are passing empty string as a Queue name Plz check RabbitMq configuration .

like image 27
Rajat Avatar answered Sep 29 '22 16:09

Rajat