IntelliJ RabbitMQ Pro

Getting Started

RabbitMQ management right inside the IDE – like the Database tool window, but for RabbitMQ. Browse queues and exchanges, publish and read messages, watch live charts and keep test messages next to your code in .rabbit request files.

RabbitMQ tool window and a .rabbit request file

Useful links

Requirements

  • The broker must have the rabbitmq_management plugin enabled (Docker image rabbitmq:*-management).
  • The management HTTP API (default port 15672) is used for browsing, statistics and administration.
  • AMQP 0-9-1 (default port 5672) is used for publishing, getting and consuming messages.

Installing the Plugin

Open Settings, select Plugins and switch to the Marketplace tab. Enter "RabbitMQ Pro" into the search field, select RabbitMQ Pro from the list and click Install. No restart of the project is needed; the RabbitMQ tool window appears on the right side of the IDE.

Connecting to a broker

  • Click + in the RabbitMQ tool window and fill in host, ports, virtual host and credentials. Test Connection checks both the management API and AMQP.
  • A connection is stored either in the IDE (visible in every project) or in the project. Passwords are kept in the IDE Password Safe, never in project files.
  • If the project root contains docker-compose.yml (or compose.yaml) with a RabbitMQ service, the plugin offers it as a connection – ports, user, password and virtual host are read from the file, including values from .env.
  • Double-click a connection to connect. Any number of connections can be open at the same time.

Features

  • Tool window with any number of broker connections (global or per project)
  • Automatic detection of RabbitMQ services in docker-compose.yml
  • Queues, exchanges and bindings: browse, create, delete, purge
  • Publish messages, get messages with or without acknowledgement, live consume
  • Live charts of queue depth and message rates, topology diagram
  • Broker administration: virtual hosts, users, permissions, policies, connections, channels
  • .rabbit request files (like .http files) to publish test messages and declare topology from the editor
  • Nothing blocks the IDE: all communication with the broker runs in the background and the numbers refresh automatically

Queues and messages

Double-click a queue to open it in an editor tab. The Overview tab shows live charts of queued messages and message rates, recorded from the moment you connect.

Queue overview with live charts

The Messages tab reads messages in three ways:

  • Peek – messages are returned to the queue, nothing is lost.
  • Get and ack – messages are removed from the queue.
  • Get and hold or Start consuming – messages stay unacknowledged and you decide about each one: Ack, Requeue or Reject (dropped or dead-lettered).

JSON and XML payloads are highlighted and can be pretty-printed. Messages still held when the tab is closed go back to the queue. The Publish tab sends a message with properties and headers to the queue or to any exchange, and Copy as .rabbit turns the form into a request for a .rabbit file.

Consuming messages with manual acknowledgement

Topology and dashboard

Double-click a connected broker to open its dashboard: totals, charts, a Topology diagram of exchanges, bindings and queues, and tables for connections, channels, consumers, virtual hosts, users, permissions and policies.

Topology diagram Broker dashboard

.rabbit request files

A .rabbit file keeps test messages and topology in the project, the same way .http files keep HTTP requests. It is handy in projects that only contain consumers: publish a test message with one click while developing.

  • Create one with New | RabbitMQ Request File.
  • Run a request with the green icon in the gutter, or all of them with Run all in the banner above the editor.
  • The banner also selects the connection the file runs against; the choice is remembered per file.
  • Results are printed to the RabbitMQ Console tool window.
  • Variables support completion, go to declaration, find usages and rename.
  • Copy Definition on a queue or exchange (and Copy All Definitions on a connection) puts ready-to-paste requests on the clipboard.
Running requests from a .rabbit file

Request syntax

# Comments start with # or //
@exchange = orders
@queue = orders.created

### Declare topology
DECLARE EXCHANGE {{exchange}} topic durable

###
DECLARE QUEUE {{queue}} durable
x-dead-letter-exchange: orders.dlx
x-message-ttl: 600000

###
BIND {{queue}} TO {{exchange}} order.created

### Publish a message
PUBLISH {{exchange}} order.created
content-type: application/json
delivery-mode: persistent
x-tenant: acme

{
  "id": "{{$uuid}}",
  "createdAt": "{{$isoTimestamp}}"
}

### Look at the first 5 messages without removing them
GET {{queue}} 5 requeue
  • ### separates requests; the text after it is the request title.
  • @name = value defines a variable, {{name}} uses it. A variable may use variables defined above it.
  • Built-in variables: {{$uuid}}, {{$timestamp}}, {{$isoTimestamp}}, {{$randomInt}}.
  • Lines key: value below a command are message properties and headers for PUBLISH, and arguments for DECLARE and BIND.
  • A message body starts after a blank line and ends at the next ###.
  • Names containing spaces are written in quotes.
Command Description
PUBLISH <exchange> [routing-key] Publishes a message to an exchange. The publish is confirmed by the broker; an unroutable message is reported.
PUBLISH QUEUE <queue> Publishes straight to a queue through the default exchange.
DECLARE QUEUE <name> [durable|transient] [auto-delete] Declares a queue. Durable is the default.
DECLARE EXCHANGE <name> [direct|topic|fanout|headers] [durable|transient] [auto-delete] [internal] Declares an exchange. The default type is direct; plugin types starting with x- are accepted.
BIND <queue> TO <exchange> [routing-key] Binds a queue to an exchange. BIND EXCHANGE <destination> TO <source> [routing-key] binds an exchange.
UNBIND ... Removes a binding; same arguments as BIND.
GET <queue> [count] [ack|requeue] Reads messages. requeue (default) returns them to the queue, ack removes them.
PURGE <queue> Removes all ready messages from a queue.
DELETE QUEUE <name>, DELETE EXCHANGE <name> Deletes a queue or an exchange.

Message properties

These keys are sent as AMQP message properties; any other key is sent as a header: content-type, content-encoding, delivery-mode (persistent or transient), priority, correlation-id, reply-to, expiration, message-id, timestamp, type, user-id, app-id.

Header and argument values are typed: 5 is a number, true a boolean, "5" the text 5.

Settings

Settings are in Settings | Tools | RabbitMQ:

  • Detection of RabbitMQ services in docker-compose.yml
  • Automatic refresh and its interval
  • How many minutes of history the charts keep
  • Default number of messages to get
  • Confirmation of destructive actions (purge, delete)

Compatibility

RabbitMQ Pro is compatible with all major JetBrains IDEs (IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, GoLand, Rider and others) with version 2025.1 and higher.

Bug Reports

Errors can be reported directly from the IDE with the Report to Author button in the error dialog.

© 2022 Matouš Němec