The maximum number of messages that the listener can process in
one transaction.
If the queue is empty, the listener processes each message when it arrives.
Each message is processed within a separate transaction.
For the WebSphere V5 default messaging provider or WebSphere MQ as the
JMS provider, if messages start accumulating on the queue then the listener
can start processing messages in batches. For generic JMS providers, this
property value is passed to the JMS provider but the effect depends on the
JMS provider.
Data type |
Integer |
Units |
Number of messages |
Default |
1 |
Range |
1 through 2147483647 |
Recommended |
For the WebSphere default messaging providers or WebSphere MQ
as the JMS provider, if you want to process multiple messages in a single
transaction, then set this value to more than 1. If messages start accumulating
on the queue, then a value greater than 1 enables multiple messages to be
batch-processed into a single transaction, and eliminates much of the overhead
of transactions on JMS messages. CAUTION:
- If one message in the batch fails processing with an exception, the entire
batch of messages is put back on the queue for processing.
- Any resource lock held by any of the interactions for the individual messages
are held for the duration of the entire batch.
- Depending on the amount of processing that messages need, and if XA transactions
are being used, setting a value greater than 1 can cause the transaction to
time out. If an XA transaction does time out routinely because processing
multiple messages exceeds the transaction timeout, reduce this property to
1 (to limit processing to one message per transaction) or increase your transaction
timeout.
|