Tuning the session

When connecting to a JMS session, you should strive to reuse an existing session as it can be quite expensive and time-consuming to create a new. Note that reusing an existing session is only fully acceptable within a thread as the session in not thread-safe.

In order to realize the requirements of guaranteed delivery, JMS defines an acknowledgement mechanism that is used in the communication between the clients. The behavior of this mechanism can be controlled by selecting an appropriate acknowledgement mode. The JMS specification provides the following three modes:

  • CLIENT_ACKNOWLEDGE: Any client code must acknowledge the message by calling one of its acknowledge methods. Failing to do this may lead to a serious buildup of resources ...

Get WildFly Performance Tuning 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.