AMQP stands for Advanced Message Queuing Protocol, AMQP is an open protocols for asynchronous message queuing which has been developed and matured over several years.
AMQP is an open standard, binary application layer protocol designed for message-oriented middleware i.e., AMQP protocol standardizes messaging using Producers, Brokers and Consumers and messaging increases loose coupling and scalability.
The AMQP was contrived to enable a wide range of applications and systems to work together, regardless of their internal designs, standardizing enterprise messaging on an industrial scale. AMQP protocol has been selected the OASIS industry standards group1, with the intention of moving to becoming an ISO/IEC standard. AMQP protocol is almost a complete superset, lacking only explicit protocol support for Last-Value-Queues and will messages. However, its deliberate design for extensibility, using an IANA-like approach with a discursive approach, ensures that such features can be added in a forward-compatible, widely agreed upon way.
How AMQP Works:
Let’s see how AMQP works, AMQP deals with publishers and consumers. The publishers produce the messages, the consumers pick them up and process them. It’s the job of the message broker (such as RabbitMQ) to ensure that the messages from a publisher go to the right consumers.
In order to do that, the broker uses two key components :-
The following diagram shows how they connect a publisher to a consumer:
As you can see the setup is pretty straightforward. A publisher sends messages to a named exchange and a consumer pulls messages from a queue or the queue pushes them to the consumer depending on the configuration.
The connections have to be made in the first place, so the question is how do publishers and consumers discover each other? Answer is Via the name of the exchange.
Usually, either the publisher or consumer creates the exchange with a given name and then makes that name public.
5 Benefits of Using AMQP Protocol :
Q. How are the messages routed from the exchange to the queue ?
Answer : First, the queue has to be attached to the given exchange. Typically, a consumer creates a queue and attaches it to an exchange at the same time. Second, messages received by the exchange have to be matched to the queue – a process called “binding”.
Q. Is AMQP Connection is Secure ?
Answer : Yes, AMQP protocol has specifically worked to integrate with TLS (eg TLS virtual server extensions, known as SNI) and SASL, the IETF set of RFCs that provide appropriate ways of securing the right to use a connection. Going further, it has ensured that modern SASL mechanisms, e.g. SCRAM-SHA and GS2, and security techniques (e.g. binding TLS channels to SASL mechanisms) works seamlessly. AMQPʼs core design allows separate negotiation of, and policies for, TLS and SASL mechanisms and upwards replacement with alternative techniques as they develop.
Q. Is AMQP support extensibility ?
Answer : Yes, AMQP has explicitly defined points of extensibility allowing vendor-specific and standards-agreed future extensions in a way compatible with, and usable by, existing implementations.