Java Message Service (called as JMS in short) enables message transmission between independent applications that are distributed over a network, be it LAN, WAN or wireless network.
Advantages of Java Message Service are listed below:
-
Asynchronous Communication – Message queue of JMS provides high performance, high throughput due to its asynchronous behaviour. Since JMS message queue is asynchronous, it has the ability to stream the messages upfront for the consumer and then process those messages together in RAM once the consumer is available. This way, JMS has the capability to send several thousands of messages within a second to concurrent consumers using multiple threads and processes.
-
Extensive Industry Support – JMS specification can be easily implemented in prevailing message servers. For this reason, JMS is the first messaging API for enterprise applications that has gained extensive industry support.
-
Reliability – Message once sent will surely be delivered to the consumer without any loss of data. Also, message will be sent only once.
-
Standard JMS Messaging API – Messaging schemes and conventions defined by JMS are widely accepted by messaging systems of several other vendors. Thus, JMS can easily address portability issues and facilitate simple application development.
-
Simple Java API – Just by quickly learning JMS API, the developers can easily and rapidly write messaging enterprise applications that are portable.
-
Loose Coupling – JMS has the ability to decouple unrelated systems. Instead of sharing common database, the systems will be communicating via system boundaries.
-
JMS Based Message Driven Beans – Message Driven Beans of EJB 2.0 is JMS based. Thus, it enables developers to implement asynchronous and scalable EJB applications.
-
Interoperability – If two applications have different messaging providers, then again they can easily communicate with each other through JMS because of its high interoperability.
-
Load Balancing – When there is increase in load i.e., lots of messages are received, then the JMS does efficient load balancing by having a pool of message processors.