Push Notification using RabbitMQ and NodeJS.

So this was one of my internship task where I had to build a push notification system for our application. However after searching various of ways of implementing it from YouTube or any blog, I wasn’t able to find a descent method. Hence, I experimented out with few technologies I came across and finally made it . Hence writing this blog tell you how I did it.

Introduction:

Push notifications are quite common whose general architecture suggest to make use of a queue based system which would keep track of all the event . RabbitMQ is more like a message broker which helps you maintain that queue to store and retrieve all those notification messages.

What is AMQP?

AMQP stands for Advanced Message Queuing Protocol. It is an open-standard protocol for message-oriented middleware. The defining features of AMQP are message orientation, queuing, routing (including point-to-point and publish-and-subscribe), reliability, and security.

AMQP has the following components:

  1. Producer is an application that sends messages.
  2. Consumer is an application that receives messages.
  3. Queue is a buffer that stores the messages.
  4. Message is the information that is sent from the producer to a consumer.
  5. Exchange receives messages from producers and pushes them to queues depending on rules defined by the exchange type. The exchange type determines how messages are routed.
  6. Binding links the queue to the exchange.

Click Here