JMS - Best Practices
- Start producer connection after you start consumer.
- Use concurrent processing of messages.
- Close the Connection when finished.
- Choose either DUPS_OK_ACKNOWLEDGE or AUTO_ACKNOWLEDGE rather than CLIENT_ACKNOWLEDGE.
- Control transactions by using separate transactional session for transactional messages and non-transactional session for non-transactional messages.
- Close session object when finished.
- Make Destination with less capacity and send messages accordingly.
- Set high Redelivery delay time to reduce network traffic.
- Set less Redelivery limit for reducing number of message hits.
- Choose non-durable messages wherever appropriate to avoid persistence overhead.
- Set optimal message age (TimeToLive value).
- Receive messages asynchronously.
- Close Producer/Consumer when finished.
- Choose message type carefully to avoid unnecessary memory overhead.
- Use 'transient' key word for variables of ObjectMessage which need not be transferred.
Tags: jms, concurrent processing, transactional messages, message, transient, asynchronous
Can't find what you're looking for? Try Google Search!
Comments on "JMS - Best Practices"