
Episode 109 - RabbitMQ
About this episode
RabbitMQ
RabbitMQ is an open source distributed message queue written in Erlang and supports many communication protocols. It was trying to solve the spaghetti 🍝 mesh architecture where every client is communicating with other client in System by introducing an extra layer in the middle.
(slide)
In this video we will explain basic components of RabbitMQ Such as AMQP, channel, queue, publisher, consumer and some stuff, we will also learn how to spin up a RabbitMQ server and we will finally write some code to develop a publisher client that post messages to RabbitMQ. We will also write the consumer piece which will be the code that reads rabbitMQ. Finally I will talk about my personal thoughts on this tech.
- RabbitMQ Components(slide)
- *Publisher
- *Consumer
- *Connection
- *Channel
- *Queue
- Spin RabbitMQ server with Docker
- Write a Publisher client NodeJs
- Write a Consumer client Nodejs
- My Thoughts about this tech
- Summary
timecodes
components 2:00
spin up docker rabbit 8:30
Write a Publisher client NodeJs 11:00
Write a consumer client NodeJs 20:30
my thoughts 33:50
Source Code: https://github.com/hnasr/javascript_playground/tree/master/rabbitmq
Example
Schedule async job
Exchange
Queues
Publisher
Consumer
AMQP
Channel
Connection
HTTP
AMQP
Uses Channels and Queues
Multiples channels into one connections
docker run --name rabbitmq -p 5672:5672 -d rabbitmq
docker run --name rabbitmq -p 5672:5672 -p 15672:15672 -d rabbitmq:3-management
HTTP
fetch("http://localhost:15672/api/vhosts”, {headers: {"Authorization" : `Basic ${btoa('guest:guest')}`}}).then(a=>a.json()).then(console.log)
fetch("http://localhost:15672/api/channels", {headers: {"Authorization" : `Basic ${btoa('guest:guest')}`}}).then(a=>a.json()).then(console.log)
fetch("http://localhost:15672/api/queues", {headers: {"Authorization" : `Basic ${btoa('guest:guest')}`}}).then(a=>a.json()).then(console.log)
https://www.squaremobius.net/amqp.node/channel_api.html#channel_bindExchange
https://www.rabbitmq.com/tutorials/tutorial-three-javascript.html
Get every episode summarized
Each time The Backend Engineering Show with Hussein Nasser publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.
Email me new episodesFree for 3 shows. No card needed.
Hosts & guests
No transcript yet
This episode has not been transcribed. Request it and it moves to the front of the queue.
More episodes
More from The Backend Engineering Show with Hussein Nasser

Caching is a cop-out
The Backend Engineering Show with Hussein Nasser

How open ai agents "hacked" hugging face
The Backend Engineering Show with Hussein Nasser

How a query optimization gave birth to infinite scroll
The Backend Engineering Show with Hussein Nasser

Postgres is half as fast in Linux 7.0
The Backend Engineering Show with Hussein Nasser