Menu

RabbitMQ Tutorials

These tutorials cover the basics of creating messaging applications using RabbitMQ.

You need to have the RabbitMQ server installed to go through the tutorials, please see the installation guide or use the Docker image.

Executable versions of these tutorials are open source, as is this website.

These tutorials focus on just one (the original) protocol supported by RabbitMQ. Examples for RabbitMQ streams on the RabbitMQ blog.

1 "Hello World!"

The simplest thing that does something

Producer -> Queue -> Consuming: send and receive messages from a named queue.

2 Work Queues

Distributing tasks among workers (the competing consumers pattern)

Producer -> Queue -> Consuming: Work Queue used to distribute time-consuming tasks among multiple workers.

3 Publish/Subscribe

Sending messages to many consumers at once

Producer -> Queue -> Consuming: deliver a message to multiple consumers. This pattern is known as publish/subscribe

4 Routing

Receiving messages selectively

Producer -> Queue -> Consuming: subscribe to a subset of the messages only.

5 Topics

Receiving messages based on a pattern (topics)

Producer -> Queue -> Consuming: receiving messages based on a pattern (topics).

6 RPC

Request/reply pattern example

Producer -> Queue -> Consuming: RPC (Remote Procedure Call), the request/reply pattern.

7 Publisher Confirms

Reliable publishing with publisher confirms

Getting Help

If you have any questions or comments regarding RabbitMQ, feel free to ask them on RabbitMQ mailing list, RabbitMQ community Discord server, or the public RabbitMQ community Slack.

AMQP 0-9-1 Overview and Quick Reference

Once you have been through the tutorials (or if you want to skip ahead), you may wish to read an Introduction to RabbitMQ Concepts and browse our AMQP 0-9-1 Quick Reference Guide.

Tutorials in Other Languages

The tutorials here use a number of popular technologies, however, there are ports available for many more languages and client libraries, for example:

We also maintain a list of community-developed clients and developer tools for a range of platforms.

Getting Help and Providing Feedback

If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them using GitHub Discussions or our community Discord server.

Help Us Improve the Docs <3

If you'd like to contribute an improvement to the site, its source is available on GitHub. Simply fork the repository and submit a pull request. Thank you!