activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <>
Subject Re: is tens of thousands of session feasible?
Date Wed, 05 Mar 2014 09:21:46 GMT
many thanks.In this mode, If I create a session and receive
message1,message2 and message3 and I only acknowledge on message3,
then if the client crashed. I will get message1 and message2
if it's true, that's what I want. I only learned the standard
acknowledge mode in the JMS spec

On Wed, Mar 5, 2014 at 5:08 PM, Noel OConnor <> wrote:
> have you seen ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE
> see
> On Wed, Mar 5, 2014 at 6:48 PM, Li Li <> wrote:
>> hi all,
>>      I want to process a batch of message using my own priority
>> algorithm. But in JMS, I can't acknowledge a single message and can
>> only acknowledge a session. So I decide to do it like this:
>>      1. Create N(=10000) sessions
>>      2. using a thread to manage session acknowledge like:
>>              for(int i=0;i<N;i++){
>>                  if session acknowledged{
>>                        receive A Message without waiting;
>>                        put this message to my own priority queue;
>>                  }
>>              }
>>       3. using another thread to process my own queue;
>>              get a message from my own queue;
>>              process this message;
>>              get the session of this message;
>>              acknowledge this session;
>>        because a session will receive only a message a time and it
>> will be blocked until this message is processed. I need create many
>> sessions(maybe I can make session a pool) . I don't know whether
>> activemq can deal with so much session. for a single consumer, I will
>> create 10000 session. if I have ten consumers, then 100,000 session be
>> created at the same time.

View raw message