Using messaging services for asynchronous communication

The message service, provided in Java EE by the Java Message Service (JMS) API, is one of the most important and versatile features provided by Java EE environments.

It uses the Producer-Consumer approach, where one peer (the Producer) puts a message into a queue and another peer (the Consumer) reads the message from there.

Both the Producer and Consumer can be different applications, even using different technologies.

This recipe will show you how to build a messaging service using GlassFish 5. Each Java EE server has its own way to set up the service, so if are using some other implementations, you should take a look at its documentation.

On the other hand, the Java EE code generated ...

Get Java EE 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.