[Work Notes] RabbitMQ — AMQP Protocol Notes

After the RabbitMQ server and client are set up, I started learning more about the RabbitMQ system. The core of RabbitMQ is based on the AMQP protocol. There’s lots of information on Wikipedia:

http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol

AMQP originated in the banking industry — which is why terminology like “broker” is used in the AMQP specification. Here is the model of AMQP.

If we want to make an application with two-way communication, we have to make the application act as both publisher and consumer.

There are definitions in the specifications we can reference directly.

Here is the packet sequence diagram captured by Wireshark.

The application plays two roles of clients in different threads.

We can define a private header and body in the content body for custom functions.

There is an important terminology called Routing Key — it’s like the “To:”, “Cc:”, and “Bcc:” in email. We have to synchronize the routing key name to ensure the message gets sent to the correct device. The definition in the spec:

The first step of the application is basically done. Next we will implement more functions on top of it.


Comments & Feedback