Java Message Service is an asynchronous communication mechanism in the distributed system field. JMS API is a Java Message Oriented Middleware (MOM) API for sending messages between two or more clients. It is very helpful in the situation where the distributed components are loosely coupled. Another popular distributed communication technology is Remote Method Invocation (RMI), which is tightly coupled and requires an application to know a remote application's methods. Java Message Service Specification
Characteristics of JMS
1. Messages can be consumes sync or async
2. Consumers can filter which message they receive
3. Messages are placed in Destination in sent order
4. Message consumption order cannot be guaranteed
2. Consumers can filter which message they receive
3. Messages are placed in Destination in sent order
4. Message consumption order cannot be guaranteed
Elements
· Connection
· Session
· Message Producer & Message Consumer
· Destination
· Message
Message Models
- Point-to-Point or P2P (Queuing Model) &
- Publisher-Subscriber or Pub-Sub (eg: Topic)
Programming
Queue vs Topic
JMS as Administered Object
It is recommended to use JNDI lookups. This promotes loose-coupling - an important aspect of SOA.
Steps involved:
Reliable Messaging done thru use of:
- Persistent Message Store and
- Acknowledgement or Transaction
No comments:
Post a Comment