Book Image

Mastering Spring Application Development

By : Anjana Mankale
Book Image

Mastering Spring Application Development

By: Anjana Mankale

Overview of this book

Table of Contents (19 chapters)
Mastering Spring Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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.