AMQP Architecture Explained: Key Components and Functionality
Advertisement
This page covers AMQP architecture basics, describing the roles of publishers, subscribers, and the broker within the Advanced Message Queuing Protocol (AMQP).
AMQP, short for Advanced Message Queuing Protocol, operates at the session layer and runs over TCP. It’s based on a publish/subscribe architecture, similar to the MQTT protocol architecture. AMQP facilitates asynchronous message transfers, irrespective of the underlying OS, hardware, or programming language.
It utilizes advanced, optimized data framing with a buffering approach, enhancing server performance. Security is provided via TLS and SASL.
AMQP Architecture

Figure: AMQP Architecture
The key difference between MQTT and AMQP lies in the broker’s composition. In AMQP, the broker consists of two components: exchanges and queues. These are bound together.
In this architecture, client applications acting as message sources are called producers (or “publishers”), while the AMQP server is referred to as the broker. Client apps create messages that are then sent to the broker. Within the broker, messages are routed and queued, awaiting consumption by consumers (or “subscribers”).
Components Explained
- Exchange: The entry point where publishers deliver messages. Messages contain routing keys, used by the “exchange” module to determine the appropriate routing. Different types of exchange methods exist, including:
- Default
- Direct Exchange
- Fanout Exchange
- Topic Exchange
- Header Exchange
- Queues: Storage locations for messages until they are delivered to or read by subscribers.
Exchange Types
- Default exchange: Routes messages to a queue where the routing key matches the queue name.
- Direct exchange: Routes messages to a queue based on a routing key that matches a binding key.
- Fanout exchange: Routes messages to all connected queues (publish/subscribe), ignoring the routing key.
- Topic exchange: Routes messages to queues based on routing keys that match a defined pattern (topic-based routing).
- Header exchange: Routes messages to queues based on header filters.
AMQP Frames
The fundamental unit of data in AMQP is a frame. Frames are used to initiate, control, and terminate message transfers between two peers.
The nine AMQP frame bodies are:
- open (the connection)
- begin (the session)
- attach (the link)
- transfer
- flow
- disposition
- detach (the link)
- end (the session)
- close (the connection)
Continue Learning IoT Protocols
- MQTT Architecture: Message Types, Format, Flow
- CoAP Protocol Architecture & Messages Exchanged between client & Server
- DDS Architecture & its protocol stack layers
- REST Protocol Vs. SoAP
- XMPP Protocol & Server-Client Interaction
- LWM2M : Key Advantages and Disadvantages
- 6LoWPAN Mesh Network & Protocol Stack
- RPL vs CORPL vs CARP: IoT Routing Protocol Comparison
- HTTP Vs. HTTPS : Key Comparison
- FTP Protocol Basics : key advantages & disadvantages
- Ping vs. Ping6: IPv4 and IPv6 Connectivity
- SFTP Vs. SCP : key Differences
- SSL Vs. SSH : Key Comparison
- MPTCP Protocol : Key Advantages & Disadvantages
- What is QUIC (Quick UDP Internet Connections)?
- TCP-IP Packet Format & its fields with example
Compare IoT Protocols
- MQTT Vs. DDS Protocol
- MQTT Vs. REST Protocol
- MQTT Vs. SMQTT
- CoAP Vs. MQTT : Key Differences
- CoAP Vs. HTTP : Comparison between them
- SFTP Vs. FTPS
- FTP Vs. HTTP : Key Differences between them
- FTP Vs. TFTP (Trivial File Transfer Protocol)
- FTP Vs. SMTP
- AMQP (Advanced Message Queuing Protocol) Vs. JMS(Java Message Service)
- TCP Vs. Multipath TCP (MPTCP)
