Comparsion of Message Oriented Middleware's Java Client libraries
Ping
- Listens to thep2p-ping
queue, printsping
and sends a message top2p-pong
.Pong
- Listens to thep2p-pong
queue, printspong
and sends a message top2p-ping
.
p.s. JMS implementations still required, any of the above.
- 2 Direct exchange with queue
RaceStarter
- Publishes to thepubsub-start-race
.Appaloosa
,Thoroughbred
,PaintHorse
- Subscribes topubsub-start-race
when created. Prints when receives the message notification.
- Topic exchange with matching route
- fanout exchange
- Java applications should rely on JMS. Using the JMS specification decouples our application code and the message-oriented middleware. Same as JPA does for database.
- There are two versions of JMS (1.1 and 2.0). 1.1 is synchronous and verbose, while 2.0 is assynchronous and simplified. It's retrocompatible though.
- JMS is not supported by all the MoMs. Some don't support at all (e.g. GCP Pub/Sub), some only support version 1.1.
- JMS does not enforces a communication protocol.
- For Spring Applications, spring provides a wrapper on top of the JMS API.