A Java Message Service (JMS) enables messaging between loosely-coupled processes. "Loosely-coupled"-for purposes of messaging-means the messages are independent of one another. The interaction between the processes can be synchronous or asynchronous.
If the process sends a message while the message consumer is not running, the message waits in the JMS provider's queue until the message consumer is available. The contents of these messages can vary, but the data within the message is usually expressed as XML.
Taking advantage of the data flow that occurs with JMS, you can eliminate the need to invoke a service such as a database management system that runs on-premise.