One other point:
On 09/12/2013 15:51, Nigel Deakin wrote:
> Clebert,
>
> On 09/12/2013 14:10, Clebert Suconic wrote:
>>
>>
>> Message msg1 = context.createConsumer(queue1).receive(5000);
>> Message msg2 = context.createConsumer(queue1).receive(5000);
>>
>>
>
> I would expect this to behave in the same way as with the standard API.
>
> Message msg1 = session.createConsumer(queue1).receive(5000);
> Message msg2 = session.createConsumer(queue1).receive(5000);
>
Although the behaviour would be the same, I wouldn't recommend either usage as it might cause difficulties for JMS
providers which pre-cache unconsumed messages in the consumer object. It might also be inefficient for consuming
multiple messages.
JMS 1.1 didn't define how messages are distributed amongst multiple consumers on the same queue, and this didn't change
in JMS 2.0.
Nigel