activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Li <>
Subject is tens of thousands of session feasible?
Date Wed, 05 Mar 2014 07:48:33 GMT
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