| Meme Name: | Java Messaging Service |
| Category: | software | |
| Related Concepts: | |
| Related Links: |
Sun JMS Tutorial
Sun articles on messaging
Articles on JMS
|
|
| Core Concept |
| A loosely coupled means of peer-to-peer communication.
Asynchronous - messages can be processed in any order.
Reliable - delivery can be guaranteed.
|
| JMS messages |
| Message header - used for identification.
Properties - application or provider-specific header fields.
Body - content of the message, e.g. TextMessage or ObjectMessage. |
| Point-To-Point |
| Senders address messages to a specific queue, from where receiving clients extract their messages (1 message = 1 consumer).
The receiver acknowledges the successful processing of a message. |
|
| Publish/Subscribe |
| Senders address messages to a topic in a content hierarchy.
Infrastructure distributes messages to current subscribers, message expires when all have been notified (1 message = many consumers).
Has a timing dependency: you must subscribe before consuming. |
|
|
| JMS producers |
| Implements QueueSender (PtP) or TopicPublisher (P/S) |
|
| JMS consumers |
| Implements QueueReceiver (PtP) or TopicSubscriber (P/S) interface.
Two ways of consuming messages:
synchronously - an explicit message fetch using receive() or,
asynchronously - message delivered by JMS provider using listener's onMessage() |
|
| JMS provider |
| JMS API defines common set of interfaces and associated semantics: the actual implementation is vendor specific. All adhere to JMS ensuring compatibility. |
|
|