You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Marco.Crivellaro" <ma...@gmail.com> on 2011/03/04 17:05:09 UTC

ActiveMQ connection with failover and prefetch

Hi,
I am trying to connect to a broker using failover and queue prefetch policy
set to 1, using it I don't receive any error and simply cannot connect
resulting in the application to hang.

I've tried both following formats:

failover:(tcp://localhost:61616?wireFormat.maxInactivityDuration=0&jms.prefetchPolicy.queuePrefetch=1)?initialReconnectDelay=10&maxReconnectDelay=15000

failover://tcp://localhost:61616?wireFormat.maxInactivityDuration=0&jms.prefetchPolicy.queuePrefetch=1&initialReconnectDelay=10&maxReconnectDelay=15000

You can test it using the and script in example folder:

ant
-Durl="failover://tcp://localhost:61616?wireFormat.maxInactivityDuration=0&jms.prefetchPolicy.queuePrefetch=1&initialReconnectDelay=10&maxReconnectDelay=15000"
producer -Dsubject="test"


If I remove the prefetch policy parameter the connection is established.

--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-connection-with-failover-and-prefetch-tp3335495p3335495.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ connection with failover and prefetch

Posted by "Marco.Crivellaro" <ma...@gmail.com>.
thank you so much, works like a charm 

--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-connection-with-failover-and-prefetch-tp3335495p3345679.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ connection with failover and prefetch

Posted by Gary Tully <ga...@gmail.com>.
yes, it should work. a url of the form:
failover:(tcp://localhost:61616?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"

The failover transport url options inside the () and the configuration
parameters outside. The ActiveMQConnectionFactory will strip off
options that begin with jms. and leave the rest for the failover
transport

On 10 March 2011 09:32, Marco.Crivellaro <ma...@gmail.com> wrote:
> can anybody let me know if this is possible at all at least?
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-connection-with-failover-and-prefetch-tp3335495p3345464.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com
http://fusesource.com

Re: ActiveMQ connection with failover and prefetch

Posted by "Marco.Crivellaro" <ma...@gmail.com>.
can anybody let me know if this is possible at all at least?

--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-connection-with-failover-and-prefetch-tp3335495p3345464.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.