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 ApsaraMQ 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. ApsaraMQ for RabbitMQ supports AMQP 0-9-1.

ItemJMSAMQP 0-9-1
DefinitionJava APIWire-level messaging protocol
Cross-platform supportNot supportedSupported
Multi-language supportNot supportedSupported
Messaging modelTwo messaging models are supported:
  • P2P
  • Pub/Sub
Four messaging models are supported:
  • Direct Exchange
  • Fanout Exchange
  • Topic Exchange
  • Header Exchange
Message typeFive message types are provided:
  • Text message
  • Object message
  • Bytes message
  • Stream message
  • Map message
Binary data
Message flowA 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.