This article introduces JMS and AMQP, and describes the differences between them.

JMS

JMS is a messaging standard that allows Java EE components to create, send, receive, and read messages. It enables communication between distributed applications in a loosely coupled, reliable, and asynchronous manner. The JMS client library of Message Queue for RabbitMQ supports JMS 1.1.

AMQP

AMQP is an open standard for passing business messages between applications or organizations. It connects systems, feeds business processes with the information they need, and reliably transmits instructions that achieve business goals. Message Queue for RabbitMQ supports AMQP 0-9-1.

Differences between JMS and AMQP

Item JMS AMQP
Definition Java API Wire-level messaging protocol
Cross-platform support Not supported Supported
Multi-language support Not supported Supported
Messaging model Two messaging models are supported:
  • P2P
  • Pub/Sub
Four messaging models are supported:
  • Direct Exchange
  • Fanout Exchange
  • Topic Exchange
  • Header Exchange
Message type Five message types are provided:
  • Text message
  • Object message
  • Bytes message
  • Stream message
  • Map message
Binary data
Message flow A producer sends a message to a queue or topic. Then, a consumer receives the message from the queue or topic. A producer sends a message to an exchange. The exchange pushes the message to a queue. Then, a consumer receives the message from the queue.