The message service, provided in Jakarta EE by the Java Message Service (JMS) API, is one of the most important and versatile features provided by Jakarta 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 Eclipse GlassFish 5.1. Each Jakarta EE server has its own way to set up the service, so if you are using some other implementations, you should take a look at its documentation.
On the other hand, the Jakarta EE code generated here will work on any Jakarta EE 8-compatible implementation. Standards for the win!