###############################
# which version of ActiveMQ are you using?
###############################

I'm using version ActiveMQ 5.0.0.23-fuse

###############################
# are you using queues or topics and are you using persistent or non
persistent messaging?
###############################

I'm using topics and my problematic client is strictly a publisher and my
problem occurs before any messages are actually sent, though the messages
are Non-Persistent if that helps.

###############################
# details of your environment can help too such as
###############################

Mac OS X 10.5.5 with Java version "J2SE (build 1.5.0_16-b06-284)"

I'm running the message bus standalone and running the client standalone,
there are no application servers involved.

###############################
Problem description
###############################

I'm trying to implement a simple auto-reconnect strategy for my standalone
client.  It creates two publishers to two different topics.  There are
certain parameters that when added to the connection URL, cause my client to
hang indefinitely between creating the first and second publisher.  The
publishers are created within a loop, so there is no code in between
creating the first publisher and the second.  In my jndi.properties file,
I've tried multiple things.

This works (no parameters on the reconnect URL):

java.naming.provider.url=failover://(tcp://localhost:61614)?initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false

This works also (adding "wireFormat.maxInactivityDuration=0&keepAlive=true"
to reconnect URL):

java.naming.provider.url=failover://(tcp://localhost:61614?wireFormat.maxInactivityDuration=0&keepAlive=true)?initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false

As soon as I attempt to add more parameters to the URL, however, things go
awry.  For instance, this entry (by just adding "jms.prefetchPolicy.all=500"
to reconnect URL):

java.naming.provider.url=failover://(tcp://localhost:61614?jms.prefetchPolicy.all=500&wireFormat.maxInactivityDuration=0&keepAlive=true)?initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false

My application will create my first publisher and then hang indefinitely
without creating my second publisher.  At this point, SIGTERM and SIGQUIT
signals do nothing, I have to send a SIGKILL to get rid of the java process.

Ultimately, I would like to use this URL:

java.naming.provider.url=failover://(tcp://localhost:61614?connectionTimeout=0&jms.prefetchPolicy.all=500&jms.useCopyOnSend=false&jms.useCompression=true&wireFormat.maxInactivityDuration=0&keepAlive=true)?initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false

But I can't because of this freeze I keep encountering.

I've checked some past posts such as:

http://www.nabble.com/ActiveMQ-failover-url-problems-tt13764784.html#a13764784

But they don't seem to be able to help me.

In my code, the freeze seems to occur as soon as I call
TopicConnection.start() for the TopicConnection for my first publisher.

Thoughts?
-- 
View this message in context: 
http://www.nabble.com/ActiveMQ-client-library-hanging-indefinitely-when-attempting-to-use-failover-URL-in-conjunction-with-connection-paramters-tp21317433p21317433.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to