384 Patterns: Implementing Self-Service in an SOA Environment
11.6 System management for JMS
This section takes a brief look at system management issues when using JMS
11.6.1 JMS performance issues
Some issues that play a role in JMS messaging performance are:
Generic versus specific message structure
Making the message structure more generic requires more translation and
interpretation time at the sender and receiver ends. Making a message too
specific reduces flexibility for even small changes in the message structure.
Remember to create an error queue for messages that cannot be validated.
Using persistent messages requires writing the messages to disk, which
takes time, reducing performance.
In a request/reply scenario, it is important that the issue of blocking calls is
dealt with correctly. Essentially, EJBs should only be used with appropriate
request/reply timeouts and retries.
Minimize the time spent in a message-driven bean processing the message.
This will make message-driven bean processing faster. Let the pool of
message-driven beans depend on the number of messages that arrive at the
Optimization with connection
Start the connection when appropriate so that consumers are ready to
consume messages before the producers are started. Also process
messages concurrently using a server session pool for the processing of the
messages. Close the connection when you are finished consuming
11.6.2 Performance monitoring for mediations
When PMI is enabled, the following information is collected for each mediated
Mediation time is the time taken to perform the mediation.
Messages mediated is the number of messages mediated at this destination.