activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve56 <strab...@csc.com>
Subject how can I really use more then 1 receiver on the same queue?
Date Mon, 16 Mar 2009 09:08:20 GMT

my environment:
  - AMQ 5.2.0
  - java 1.6.0_12

the scenario:
  - few threads are waiting for long-time processing messages
  - each thread is using a separate connection and session
  - no transaction
  - session works on CLIENT_ACKNOWLEDGE mode 

case 1:
  - a lot of messages are present in queue
  - multi-thread application starts
  - only the first thread consumes messages, the other threads never.
  ok, if I well understands, the default value of prefetchPolicy assign all
messages (<1000) to the first thread

case 2:
  - set prefetchPolicy = 0
  - now all threads work consuming sequentially (non in parallel!) messages.
i.e: a thread receives a new message only when the previous thread do
message.acknowledge (or session.commit)

If I need to process more then 1 messages in parallel with acknowledge what
can I do?

many thanks 
steve56 

-- 
View this message in context: http://www.nabble.com/how-can-I-really-use-more-then-1-receiver-on-the-same-queue--tp22534104p22534104.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message