RabbitMQ is an open-source message broker often used for communication between microservices in the cloud. Learn how to build your own message queue with RabbitMQ in docker. 

#programming #cloudcomputing #100SecondsOfCode

🔗 Resources

RabbitMQ https://www.rabbitmq.com
Terraform in 100 Seconds https://youtu.be/tomUWcQ0P3k
Elixir in 100 Seconds https://youtu.be/R7t7zca8SyM

🔥 Get More Content - Upgrade to PRO

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- What is RabbitMQ?
- What is RabbitMQ used for?
- How does RabbitMQ work?
- Basic RabbitMQ tutorial in Node.js
- What is a messaging protocol?
2024-02-04T05:20:39.702Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
2b14cfb4-e325-40eb-b689-64b8f70e95d7
624dfeb7801f4794cfbff143389b0e5c6ff500925c1efbb37313ea0e5553a19b
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
RabbitMQ, an open source distributed message broker that works like a post office in the cloud.
It was developed in 2007 and written in the Erlang programming language, which itself is famous for powering the OpenTelecom platform.
In the beginning, apps were built as monoliths with all concerns coupled together on a single run time.
The problem is that not everything scales in parallel.
Differing computational needs gave rise to the micro service architecture, where every concern has its own runtime that scales independently.
RabbitMQ is a tool that allows these microservices to communicate asynchronously with a variety via different protocols.
For example, you may have an app that applies deep learning photo filters.
When the user clicks a button, that request goes to a REST API, but instead of processing the image there, it produces a message with the required data and publishes it to an exchange.
The exchange is then responsible for routing it to 1 or more queues, which are linked to the Exchange with a binding and routing key.
Now the message sits in the queue until it's handled by the consumer, which in this case would be the image processing server.
The exchange can route directly to a specific queue or to multiple queues with a shared pattern using topics or to to every queue it knows about with fan out.
The end result is an architecture that allows servers to both publish and subscribe to data, thanks to the RabbitMQ you middleman.
To get started, install it or run it in a Docker container on port 5672.
It also contains a CLI tool to manage and inspect your broker.
Now create a file l in your favorite server side language and bring in a library that implements a messaging protocol like advanced messaging queue protocol 091.
This file will send a message, and first needs to connect to RabbitMQ.
On that connection, we can use the create channel method to declare a queue, which can be named whatever you want.
Queues can be durable where the metadata is stored on disk or transient where it's only stored in memory and now produce a message by sending a buffer to that queue.
Go ahead and run the file to create the queue and send the message, then create another file to receive the message.
In real life, this could be a different server on the other side of the world.
Connect to RabbitMQ just like we did for the publisher, then reference the same queue name on that connection.
Now use the consume method to receive a message and run a callback function with its data.
Now run that file in a separate terminal to receive the message.
That's how a basic queue works, but we could found on this code by creating an exchange to manage multiple queues at the same time.
A fan out or topic exchange would allow multiple servers to subscribe to the same messages, but can assume them at different times.
This has been RabbitMQ in 100 seconds.
Hit the like button if you wanna see more short videos like this.
Thanks for watching, and I will see you in the next one.

Speaker 0: RabbitMQ, an open source distributed message broker that works like a post office in the cloud. It was developed in 2007 and written in the Erlang programming language, which itself is famous for powering the OpenTelecom platform. In the beginning, apps were built as monoliths with all concerns coupled together on a single run time. The problem is that not everything scales in parallel. Differing computational needs gave rise to the micro service architecture, where every concern has its own runtime that scales independently.

RabbitMQ is a tool that allows these microservices to communicate asynchronously with a variety via different protocols. For example, you may have an app that applies deep learning photo filters. When the user clicks a button, that request goes to a REST API, but instead of processing the image there, it produces a message with the required data and publishes it to an exchange. The exchange is then responsible for routing it to 1 or more queues, which are linked to the Exchange with a binding and routing key. Now the message sits in the queue until it's handled by the consumer, which in this case would be the image processing server.

The exchange can route directly to a specific queue or to multiple queues with a shared pattern using topics or to to every queue it knows about with fan out. The end result is an architecture that allows servers to both publish and subscribe to data, thanks to the RabbitMQ you middleman. To get started, install it or run it in a Docker container on port 5672. It also contains a CLI tool to manage and inspect your broker. Now create a file l in your favorite server side language and bring in a library that implements a messaging protocol like advanced messaging queue protocol 091.

This file will send a message, and first needs to connect to RabbitMQ. On that connection, we can use the create channel method to declare a queue, which can be named whatever you want. Queues can be durable where the metadata is stored on disk or transient where it's only stored in memory and now produce a message by sending a buffer to that queue. Go ahead and run the file to create the queue and send the message, then create another file to receive the message. In real life, this could be a different server on the other side of the world.

Connect to RabbitMQ just like we did for the publisher, then reference the same queue name on that connection. Now use the consume method to receive a message and run a callback function with its data. Now run that file in a separate terminal to receive the message. That's how a basic queue works, but we could found on this code by creating an exchange to manage multiple queues at the same time. A fan out or topic exchange would allow multiple servers to subscribe to the same messages, but can assume them at different times.

This has been RabbitMQ in 100 seconds. Hit the like button if you wanna see more short videos like this. Thanks for watching, and I will see you in the next one.
RabbitMQ, an open source distributed message broker that works like a post office in the cloud. It was developed in 2007 and written in the Erlang programming language, which itself is famous for powering the OpenTelecom platform. In the beginning, apps were built as monoliths with all concerns coupled together on a single run time.
databases
The problem is that not everything scales in parallel.
Differing computational needs gave rise to the micro service architecture, where every concern has its own runtime that scales independently. RabbitMQ is a tool that allows these microservices to communicate asynchronously with a variety via different protocols. For example, you may have an app that applies deep learning photo filters.
machine learning
When the user clicks a button, that request goes to a REST API, but instead of processing the image there, it produces a message with the required data and publishes it to an exchange. The exchange is then responsible for routing it to 1 or more queues, which are linked to the Exchange with a binding and routing key.
Now the message sits in the queue until it's handled by the consumer, which in this case would be the image processing server. The exchange can route directly to a specific queue or to multiple queues with a shared pattern using topics or to to every queue it knows about with fan out. The end result is an architecture that allows servers to both publish and subscribe to data, thanks to the RabbitMQ you middleman. To get started, install it or run it in a Docker container on port 5672. It also contains a CLI tool to manage and inspect your broker. Now create a file l in your favorite server side language and bring in a library that implements a messaging protocol like advanced messaging queue protocol 091.
software
streaming
software development
customers
databases
This file will send a message, and first needs to connect to RabbitMQ. On that connection, we can use the create channel method to declare a queue, which can be named whatever you want. Queues can be durable where the metadata is stored on disk or transient where it's only stored in memory and now produce a message by sending a buffer to that queue. Go ahead and run the file to create the queue and send the message, then create another file to receive the message. In real life, this could be a different server on the other side of the world. Connect to RabbitMQ just like we did for the publisher, then reference the same queue name on that connection. Now use the consume method to receive a message and run a callback function with its data. Now run that file in a separate terminal to receive the message. That's how a basic queue works, but we could found on this code by creating an exchange to manage multiple queues at the same time.
A fan out or topic exchange would allow multiple servers to subscribe to the same messages, but can assume them at different times. This has been RabbitMQ in 100 seconds. Hit the like button if you wanna see more short videos like this. Thanks for watching, and I will see you in the next one.
streaming
youtube
multimedia
social media
video gaming
podcasts
RabbitMQ, an open source distributed message broker that works like a post office in the cloud. It was developed in 2007 and written in the Erlang programming language, which itself is famous for powering the OpenTelecom platform. In the beginning, apps were built as monoliths with all concerns coupled together on a single run time. The problem is that not everything scales in parallel. Differing computational needs gave rise to the micro service architecture, where every concern has its own runtime that scales independently. RabbitMQ is a tool that allows these microservices to communicate asynchronously with a variety via different protocols. For example, you may have an app that applies deep learning photo filters. When the user clicks a button, that request goes to a REST API, but instead of processing the image there, it produces a message with the required data and publishes it to an exchange. The exchange is then responsible for routing it to 1 or more queues, which are linked to the Exchange with a binding and routing key. Now the message sits in the queue until it's handled by the consumer, which in this case would be the image processing server. The exchange can route directly to a specific queue or to multiple queues with a shared pattern using topics or to to every queue it knows about with fan out. The end result is an architecture that allows servers to both publish and subscribe to data, thanks to the RabbitMQ you middleman. To get started, install it or run it in a Docker container on port 5672. It also contains a CLI tool to manage and inspect your broker. Now create a file l in your favorite server side language and bring in a library that implements a messaging protocol like advanced messaging queue protocol 091. This file will send a message, and first needs to connect to RabbitMQ. On that connection, we can use the create channel method to declare a queue, which can be named whatever you want. Queues can be durable where the metadata is stored on disk or transient where it's only stored in memory and now produce a message by sending a buffer to that queue. Go ahead and run the file to create the queue and send the message, then create another file to receive the message. In real life, this could be a different server on the other side of the world. Connect to RabbitMQ just like we did for the publisher, then reference the same queue name on that connection. Now use the consume method to receive a message and run a callback function with its data. Now run that file in a separate terminal to receive the message. That's how a basic queue works, but we could found on this code by creating an exchange to manage multiple queues at the same time. A fan out or topic exchange would allow multiple servers to subscribe to the same messages, but can assume them at different times. This has been RabbitMQ in 100 seconds. Hit the like button if you wanna see more short videos like this. Thanks for watching, and I will see you in the next one.
RabbitMQ,
rabbitmq
an
an
open
open
source
source
distributed
distributed
message
message
broker
broker
that
that
works
works
like
like
a
a
post
post
office
office
in
in
the
the
cloud.
cloud
It
it
was
was
developed
developed
in
in
2007
2007
and
and
written
written
in
in
the
the
Erlang
erlang
programming
programming
language,
language
which
which
itself
itself
is
is
famous
famous
for
for
powering
powering
the
the
OpenTelecom
opentelecom
platform.
platform
In
in
the
the
beginning,
beginning
apps
apps
were
were
built
built
as
as
monoliths
monoliths
with
with
all
all
concerns
concerns
coupled
coupled
together
together
on
on
a
a
single
single
run
run
time.
time
The
the
problem
problem
is
is
that
that
not
not
everything
everything
scales
scales
in
in
parallel.
parallel
Differing
differing
computational
computational
needs
needs
gave
gave
rise
rise
to
to
the
the
micro
micro
service
service
architecture,
architecture
where
where
every
every
concern
concern
has
has
its
its
own
own
runtime
runtime
that
that
scales
scales
independently.
independently
RabbitMQ
rabbitmq
is
is
a
a
tool
tool
that
that
allows
allows
these
these
microservices
microservices
to
to
communicate
communicate
asynchronously
asynchronously
with
with
a
a
variety
variety
via
via
different
different
protocols.
protocols
For
for
example,
example
you
you
may
may
have
have
an
an
app
app
that
that
applies
applies
deep
deep
learning
learning
photo
photo
filters.
filters
When
when
the
the
user
user
clicks
clicks
a
a
button,
button
that
that
request
request
goes
goes
to
to
a
a
REST
rest
API,
api
but
but
instead
instead
of
of
processing
processing
the
the
image
image
there,
there
it
it
produces
produces
a
a
message
message
with
with
the
the
required
required
data
data
and
and
publishes
publishes
it
it
to
to
an
an
exchange.
exchange
The
the
exchange
exchange
is
is
then
then
responsible
responsible
for
for
routing
routing
it
it
to
to
1
1
or
or
more
more
queues,
queues
which
which
are
are
linked
linked
to
to
the
the
Exchange
exchange
with
with
a
a
binding
binding
and
and
routing
routing
key.
key
Now
now
the
the
message
message
sits
sits
in
in
the
the
queue
queue
until
until
it's
it's
handled
handled
by
by
the
the
consumer,
consumer
which
which
in
in
this
this
case
case
would
would
be
be
the
the
image
image
processing
processing
server.
server
The
the
exchange
exchange
can
can
route
route
directly
directly
to
to
a
a
specific
specific
queue
queue
or
or
to
to
multiple
multiple
queues
queues
with
with
a
a
shared
shared
pattern
pattern
using
using
topics
topics
or
or
to
to
to
to
every
every
queue
queue
it
it
knows
knows
about
about
with
with
fan
fan
out.
out
The
the
end
end
result
result
is
is
an
an
architecture
architecture
that
that
allows
allows
servers
servers
to
to
both
both
publish
publish
and
and
subscribe
subscribe
to
to
data,
data
thanks
thanks
to
to
the
the
RabbitMQ
rabbitmq
you
you
middleman.
middleman
To
to
get
get
started,
started
install
install
it
it
or
or
run
run
it
it
in
in
a
a
Docker
docker
container
container
on
on
port
port
5672.
5672
It
it
also
also
contains
contains
a
a
CLI
cli
tool
tool
to
to
manage
manage
and
and
inspect
inspect
your
your
broker.
broker
Now
now
create
create
a
a
file
file
l
l
in
in
your
your
favorite
favorite
server
server
side
side
language
language
and
and
bring
bring
in
in
a
a
library
library
that
that
implements
implements
a
a
messaging
messaging
protocol
protocol
like
like
advanced
advanced
messaging
messaging
queue
queue
protocol
protocol
091.
091
This
this
file
file
will
will
send
send
a
a
message,
message
and
and
first
first
needs
needs
to
to
connect
connect
to
to
RabbitMQ.
rabbitmq
On
on
that
that
connection,
connection
we
we
can
can
use
use
the
the
create
create
channel
channel
method
method
to
to
declare
declare
a
a
queue,
queue
which
which
can
can
be
be
named
named
whatever
whatever
you
you
want.
want
Queues
queues
can
can
be
be
durable
durable
where
where
the
the
metadata
metadata
is
is
stored
stored
on
on
disk
disk
or
or
transient
transient
where
where
it's
it's
only
only
stored
stored
in
in
memory
memory
and
and
now
now
produce
produce
a
a
message
message
by
by
sending
sending
a
a
buffer
buffer
to
to
that
that
queue.
queue
Go
go
ahead
ahead
and
and
run
run
the
the
file
file
to
to
create
create
the
the
queue
queue
and
and
send
send
the
the
message,
message
then
then
create
create
another
another
file
file
to
to
receive
receive
the
the
message.
message
In
in
real
real
life,
life
this
this
could
could
be
be
a
a
different
different
server
server
on
on
the
the
other
other
side
side
of
of
the
the
world.
world
Connect
connect
to
to
RabbitMQ
rabbitmq
just
just
like
like
we
we
did
did
for
for
the
the
publisher,
publisher
then
then
reference
reference
the
the
same
same
queue
queue
name
name
on
on
that
that
connection.
connection
Now
now
use
use
the
the
consume
consume
method
method
to
to
receive
receive
a
a
message
message
and
and
run
run
a
a
callback
callback
function
function
with
with
its
its
data.
data
Now
now
run
run
that
that
file
file
in
in
a
a
separate
separate
terminal
terminal
to
to
receive
receive
the
the
message.
message
That's
that's
how
how
a
a
basic
basic
queue
queue
works,
works
but
but
we
we
could
could
found
found
on
on
this
this
code
code
by
by
creating
creating
an
an
exchange
exchange
to
to
manage
manage
multiple
multiple
queues
queues
at
at
the
the
same
same
time.
time
A
a
fan
fan
out
out
or
or
topic
topic
exchange
exchange
would
would
allow
allow
multiple
multiple
servers
servers
to
to
subscribe
subscribe
to
to
the
the
same
same
messages,
messages
but
but
can
can
assume
assume
them
them
at
at
different
different
times.
times
This
this
has
has
been
been
RabbitMQ
rabbitmq
in
in
100
100
seconds.
seconds
Hit
hit
the
the
like
like
button
button
if
if
you
you
wanna
wanna
see
see
more
more
short
short
videos
videos
like
like
this.
this
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
In this video, a representative explains how to use the distributed message broker, an open source distributed message broker that allows for microservices to communicate via different protocols. The system uses a queue architecture and a messaging protocol called advanced messaging queue protocol 091 to handle requests and send messages to various queues. The system can connect to the same queue and use a fan out or topic exchange to subscribe to multiple messages at once.
RabbitMQ in 100 Seconds
RabbitMQ, an open source distributed message broker that works like a post office in the cloud. It was developed in 2007 and written in the Erlang programming language, which itself is famous for powering the OpenTelecom platform. In the beginning, apps were built as monoliths with all concerns coupled together on a single run time. The problem is that not everything scales in parallel. Differing computational needs gave rise to the micro service architecture, where every concern has its own runtime that scales independently. RabbitMQ is a tool that allows these microservices to communicate asynchronously with a variety via different protocols. For example, you may have an app that applies deep learning photo filters. When the user clicks a button, that request goes to a REST API, but instead of processing the image there, it produces a message with the required data and publishes it to an exchange. The exchange is then responsible for routing it to 1 or more queues, which are linked to the Exchange with a binding and routing key. Now the message sits in the queue until it's handled by the consumer, which in this case would be the image processing server. The exchange can route directly to a specific queue or to multiple queues with a shared pattern using topics or to to every queue it knows about with fan out. The end result is an architecture that allows servers to both publish and subscribe to data, thanks to the RabbitMQ you middleman. To get started, install it or run it in a Docker container on port 5672. It also contains a CLI tool to manage and inspect your broker. Now create a file l in your favorite server side language and bring in a library that implements a messaging protocol like advanced messaging queue protocol 091. This file will send a message, and first needs to connect to RabbitMQ. On that connection, we can use the create channel method to declare a queue, which can be named whatever you want. Queues can be durable where the metadata is stored on disk or transient where it's only stored in memory and now produce a message by sending a buffer to that queue. Go ahead and run the file to create the queue and send the message, then create another file to receive the message. In real life, this could be a different server on the other side of the world. Connect to RabbitMQ just like we did for the publisher, then reference the same queue name on that connection. Now use the consume method to receive a message and run a callback function with its data. Now run that file in a separate terminal to receive the message. That's how a basic queue works, but we could found on this code by creating an exchange to manage multiple queues at the same time. A fan out or topic exchange would allow multiple servers to subscribe to the same messages, but can assume them at different times. This has been RabbitMQ in 100 seconds. Hit the like button if you wanna see more short videos like this. Thanks for watching, and I will see you in the next one.
In this video, a representative explains how to use the distributed message broker, an open source distributed message broker that allows for microservices to communicate via different protocols. The system uses a queue architecture and a messaging protocol called advanced messaging queue protocol 091 to handle requests and send messages to various queues. The system can connect to the same queue and use a fan out or topic exchange to subscribe to multiple messages at once.