RabbitMq Installation — Open Source Message Broker

Webner Solutions
3 min readOct 14, 2021

--

RabbitMq Installation

RabbitMq Installation — Open Source Message Broker
RabbitMq Installation — Open Source Message Broker

Installation on Linux machine

  1. Update the package list
    sudo apt-get update -y
  2. Install prerequisite in most cases
    sudo apt-get install curl gnupg -y
  3. Install RabbitMq
    sudo apt-get install -y rabbitmq-server
  4. Start RabbitMq
    sudo systemctl start rabbitmq-server

RabbitMq Installation on the windows machine

  1. Install via chocolatey
    choco install rabbitmq
  2. Chocolatey(RabbitMq package) is open source and available on git
    https://github.com/rabbitmq/chocolatey-package

Overview

By default, RabbitMq listens to port 5672 RabbitMq server.

Related Terms

Queue
Everything/Messages go to queue for further processing.
Whatever message produced by the publisher goes to the queue and from the queue, the consumer consumes.

The publisher doesn’t contact the queue directly. It needs an Exchange.

Exchange
It is an additional layer to implement the concept of abstraction. The producer doesn’t know further processing of the messages.

Also if we have multiple queues, the exchange is responsible for routing the messages to the specific queue.

Connection
In order for a user to work with RabbitMQ, it should 1st initialize a connection.

Routing Key
The producer will specify a routing key along with the message to tell the exchange in which queue this message will go.
Binding
It is a connection between queue and exchange.

Binding Key
Each binding has a unique binding key, to avoid any confusion for the target queue.

Let’s say we have two queues one with binding key white and the other with black.
If the producer specifies white — the message will go to the first queue and it specifies black message will go to the 2nd queue.

Note — Exchange will send message to the queue where
Routing key = Binding key

Types of Exchange

  • Fannout
    It ignores the routing key and sends messages to all known queues.
  • Topic
    It allows partial matching of the routing key.
  • Header
    In this message, a header is used instead of a routing key.
  • Default
    It is also known as a nameless exchange. It is the ideal exchange. Which checks if the routing key is equal to a binding key or not.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Originally published at https://blog.webnersolutions.com on October 14, 2021.

--

--

Webner Solutions
Webner Solutions

Written by Webner Solutions

Our team in Salesforce is very strong, with in-depth knowledge of Salesforce classic and Lightning development as well as the Service cloud.

No responses yet