Introduction to JMS and its components

Posted By :Dimpal Bhatia |31st January 2020

What is JMS?

JMS stands for Java Message Service.  JMS API implements Messaging systems in Java-based applications only, it does not support other languages. JMS API is used to send, receive , create and read messages or exchange messages between different systems. We can deploy the same application in any JMS Provider software when we develop a Java Messaging System with java message service.

What is a Message?

The message is a piece of information. It can be an XML document, text, JSON data, or a java object (entity). The message is very useful data to communicate between any systems.

What is Messaging?

The meaning of messaging means exchanging information between different components in the same system or different systems. It can happen in both manners either synchronous or asynchronous.

JMS Advantages:-

1) Loosely Coupled:-  We can develop loosely coupled applications with the help of JMS. Users can change the existing JMS Provider to the new JMS Provider with little changes of configurations or without changing our JMS Application code because JMS API provides some standards that need to implemented by all JMS providers.

2) Asynchronous:-  We can also develop asynchronous messaging applications by using JMS. JMS Sender can continue on its own work while sending messages. It does not need to wait for the completion of message consumption by the JMS Receiver.

3) Robust and Reliable:-  We can develop reliable applications by using JMS API because JMS ensures that a message is delivered only once to the destination system.

4) Interoperability:- JMS API also provides Interoperability between other Java Platform languages like Scala and Groovy.

JMS Components

a) JMS Client:- Java program used to produce, publish or consume, subscribe messages.

b) JMS Sender:- JMS Client sends messages to the destination system. JMS sender can also be known as JMS Producer or JMS Publisher.

c) JMS Receiver:- JMS receiver which is used to receive messages from the Source system. JMS Receiver can also be known as JMS Consumer or JMS Subscriber.

4) JMS Provider:- JMS API does not contain any implementation because it has only a set of interfaces. JMS Provider is a third-party system and this is responsible to provide messaging features to the clients. JMS Provider is also known as Message Oriented Middleware software or Message Broker or JMS Server. JMS provider controls this Message Oriented Middleware software by providing some UI components to JMS provider. 

5) JMS Administered Objects:- JMS Administered are the objects which are preconfigured by an administrator for the use of JMS clients. These are ConnectionFactory and Destination Objects.

6) Connection Factory:- Connection Factory is an object that is used to create a connection between JMS Provider and Java Application. It is used by applications to communicate with different JMS Provider.

7) Destination:- Destinations objects are used by a JMS Client to specify the destination of messages it is sending and the source of messages it receives. Destinations are of two types Queue and Topic.

8) JMS Message:- JMS message is an object that contains the data being transferred between different JMS clients.



About Author

Dimpal Bhatia

She is a bright java developer. She has a good knowledge of JavaScript, jQuery, JSP, and ElasticSearch. Her hobbies are playing badminton and reading books

Request For Proposal

[contact-form-7 404 "Not Found"]

Ready to innovate ? Let's get in touch

Chat With Us