Java Messaging Service
JMS Servers facilitate asynchronous operations in your application. With the advent of EJB 2.0 came the introduction of Message Driven Beans: stateless beans representing business processes that are initiated by a JMS message. You put a message in a JMS destination, which is either a Topic or a Queue, and someone takes that message out of the destination and performs some business process based off of the contents of that message.
Because JMS Servers host messages, application servers usually define limits either to the number of messages that can be in the server at any given time or size of the messages in bytes. You can define these upper limits; the balance is between memory consumption and properly servicing your JMS subscribers. If your thresholds are too low, messages will be lost; if your thresholds are too high and the server is used to an excessive upper limit, it can degrade the performance of your entire system.
Along with total storage requirements, there are other aspects of JMS Servers that can be tuned, including the following:
Message Delivery Mode: persistent or non-persistent
Time-to-live: defines a expiration time on a message
Transaction States
Acknowledgments
Each of these aspects will be explored in detail in later articles, but the basic questions that you have to ask are these: How important are these messages to the business process? Does it matter if one or more messages are lost? Obviously, the less you care about the messages actually reaching their destination, the better the performancebut this will be dictated by your business requirements.