activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Smith <>
Subject Re: Could not start connection when using jms.prefetchPolicy on failover protocol url
Date Thu, 15 Sep 2011 21:48:40 GMT
Hi Johan,

Thanks for the info - placing the prefetch on the failover worked.  I put the prefetch on
the tcp: based on the page at 

The failover page dose not reference prefetch option:

Unfortunately the behavior seem to be the same when we have 3 brokers in a cluster with 1
producer and 4 consumers (each consumer connected to a separate broker - except the 4th which
connected to the same broker as consumer 1).   When producer sends msgs, most of the msgs
got distributed to consumers to 2 of the 3 brokers.  

The msgs took different amount of time to process - even with prefetch - I see one broker
processed 1 msg and sits idle, where messages were queued up on the other 3 consumers.  I
thought the prefetch is supposed to distribute the message to who ever is free to process
(empty prefetch buffer), but the behavior was showing msgs gets queued up behind each consumer
regardless - so some sit idle while another has msgs queued up.

The distribution was round-robin 1 to each consumer - favoriting consumers on 2 brokers out
of 3.  In multiple runs, consumer on broker 2 always get 1msg out of 30 sent.  Broker 2
happened to where the producer is connected.  The pattern seems to suggest if local the consumer
on the broker where the producer is connected, the broker forwards msgs to the other brokers
- regardless if consumers other brokers are busy as well.  Prefetch does not seem to work
across cluster.  I tried with both sync and async receive, I placed prefetchSize=1 on networkConnector 
- same behavior.


From: Johan Edstrom <>
To: "" <>
Sent: Thursday, September 8, 2011 8:50 PM
Subject: Re: Could not start connection when using jms.prefetchPolicy on failover protocol

You need to have the options outside the parentheses, there should be samples on the failover
uri page.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message