Chapter 2. Messaging with Spring JMS
Java Messaging Services (JMS) is an API used to communicate between the components in an application or between applications. The messages can be sent and received between applications and components. The messaging agents behave like middlemen to create, receive, read, and send messages. The message consumer does not need to be available at all times to receive the message. The messaging agents store the messages and they can be read whenever required.
An architect would choose JMS to achieve a loosely coupled design. The messages are asynchronous, they are delivered as soon as they arrive, and there is no request sent for the messages. It also prevents redundancy and ensures that a particular message is delivered only once.