-
Feature Request
-
Resolution: Obsolete
-
Major
-
None
-
None
When someone is receiving messages, this is a pretty common useCase:
Consumer cons = sess.createConsumer(....);
Transaction tx = getTheTransactionSomehow);
int counter = 0;
Message msg = null;
try
{
do
while (msg != null);
}
catch (Exception e)
{
tx.rollback();
}
However, this is not possible over MDBs. You basically have to transact every received message.
With the code above, we would instead commit or rollback the entire group.
It should be possible to do this kind of batching with MDBs somehow.
IMO this should be suggested as part of the Specification, as other systems also have it.