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.
Item | JMS | AMQP 0-9-1 |
---|---|---|
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:
| Four messaging models are supported:
|
Message type | Five message types are provided:
| 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. |