JMS generally contains at least three components:
Two JMS customers and a JMS server. Two customers communicate with each other through the JMS server. JMS customers are generally applications that use JMS API to send and receive messages.
The JMS server can be any application that implements JMS specifications. Some JMS servers are part of greater applications; there are some applications that are responsible for JMS tasks. There are many third-party business resources and some open source resources for JMS servers available for use.
The application uses JMS to communicate with two ways to select: JMS topics and JMS queues. The subject and queue only differences in rare some places, and the most obvious difference is that they are different from they send messages.
The JMS topic receives messages from a JMS client and distributes these messages to all JMS customers registered as theme listener. Instead, JMS queues only distribute the news to a customer, no matter how many customers are registered as the queue listener. If two or more customers are registered into a queue, a message is stored in the queue, then only one customer can receive this message. The JMS specification does not specify which customer will receive this message.