Skip to main content
Back to Dev generators

Dev

RabbitMQ Exchange Generator

Setting up RabbitMQ topology through the management UI is not repeatable. Scripting with `rabbitmqadmin` is, but remembering the declare syntax, routing key format, and when a fanout binding needs no key is friction that slows environment setup. This tool generates the three commands you need in one step. Pick the exchange type — direct, topic, fanout, or headers — and name the exchange. The generator appends `.queue` for the queue name and builds three durable declarations plus a binding. Topic exchanges get a wildcard key like `order.*`; direct exchanges get an exact key; fanout and headers produce a binding with no key since those types ignore it. Paste into a shell with `rabbitmqadmin` configured for your server and adjust the queue and routing key.

Read the complete guide — 4 min read

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Pick the exchange type.
  2. Name the exchange.
  3. Click Generate to produce the rabbitmqadmin commands.
  4. Paste them into a configured shell and adjust the queue and key.

Use Cases

  • Declaring an exchange, queue, and binding from the command line
  • Choosing the right exchange type for a routing pattern
  • Remembering the binding rules each exchange type uses
  • Scripting repeatable RabbitMQ topology for an environment
  • Setting up a messaging route without the management UI

Tips

  • Use a topic exchange when you need flexible wildcard routing.
  • Declare exchanges and queues durable for production.
  • Add a dead-letter exchange to capture rejected messages.
  • Keep routing keys consistent with a clear naming scheme.

FAQ

which exchange type should I pick

Use `direct` for exact routing-key matching, `topic` for wildcard patterns like `order.*`, `fanout` to broadcast every message to all bound queues, and `headers` to route on message header attributes. Topic is the most flexible and the common default for event-driven systems.

why declare exchanges and queues as durable

A durable exchange and queue survive a broker restart. Combined with persistent message delivery, durability ensures topology and unprocessed messages are not lost when the broker is rebooted or crashes.

why does the fanout binding have no routing key

A fanout exchange ignores routing keys entirely and delivers every message to every bound queue. Including a routing key on the binding would have no effect, so the generator omits it for fanout and headers exchanges.

You might also like

Popular tools from other categories that share themes with this one.

Try these next

More free tools from other corners of the catalog, picked by shared themes.