RabbitMQ Concepts

What is it?

  • RabbitMQ is a message broker, which accepts and forwards messsages.

  • Analogus to a postal system i.e., post box, post office and a letter carrier; RabbitMQ act as a delivery mechanism for messages.

Protocols

  • Originally implemented to support only AMPQ (Advanced Message Queueing Protocol), RabbitMQ now supports STOMP (Streaming Text Oriented Messaging Protocol) for streaming, HTTP, MQTT (MQ Telemetry Transport).

  • Details on supported protocols can be found herearrow-up-right.

RabbitMQ Terminologies

  • Producer

    • A program that is reponsible for sending/producing a message.

  • Consumer

    • A program that is responsible to receive/consuming a message.

  • Message Brokers

    • A program which is reponsible to receive message from publishers (aka producers) and route them to consumers.

  • Exchange

    • An exchange is responsible for the routing of the messages to the different queues. An exchange accepts messages from the producer application and routes them to message queues with help of header attributes, bindings, and routing keys.

  • Queue

    • A queue is the buffer that stores messages in the message broker.

  • Bindings

    • Bindings are rules that exchanges use (among other things) to route messages to queues. A binding is a link between a queue and an exchange.

  • AMQP Entities

    • Queues, exchanges and bindings are collectively referred to as AMQP entities.

  • Connection

    • A TCP connection between your application and the broker.

  • Channel

    • A virtual connection inside a connection. When publishing or consuming messages from a queue - it's all done over a channel.

  • Vhost, virtual host

    • Virtual hosts provide a way to segregate applications using the same RabbitMQ instance. Different users can have different access privileges to different vhost and queues and exchanges can be created so they only exist in one vhost.

  • Cluster

    • A cluster consists of a set of connected computers that work together. If the RabbitMQ instance consisting of more than one node - it is called a RabbitMQ cluster. A cluster is a group of nodes i.e., a group of computers.

  • Node

    • A node is a single computer the RabbitMQ cluster

AMQP Model Diagram

AMPQ Model Diagram

Applications

Learn More

Last updated