ActiveMQ connection with failover and prefetch

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ connection with failover and prefetch

Marco.Crivellaro
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.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ connection with failover and prefetch

Marco.Crivellaro
can anybody let me know if this is possible at all at least?
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ connection with failover and prefetch

gtully
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ connection with failover and prefetch

Marco.Crivellaro
thank you so much, works like a charm