4

I have C# application using nms.activemq 1.5.0.

When my application starts it tries to connect to the broker using failover protocol (I have two brokers in master-slave configuration).
If both brokers down my application is stuck in wait because of the connection.start().
I tried every bit of info i found on the web - I tried every attribute of the failover protocol, also tried setting the connection timeout, tried transport.requesttimeout.

I also tried a newer version of nms.activemq, but nothing seems to solve the issue.

Any idea on what can cause this problem or any workaround?

1
  • It is very weird, but in version 1.5.5 it hangs (using failover mode) even on connection.ClientId property assignment, what is considered as anti-patterns in .NET, because properties should represent simple, fast, non-blocking operations.
    – sgnsajgon
    Aug 21, 2014 at 19:55

1 Answer 1

12

After mining google results fI found this thread

Tim Bish answered the developer there that in NMS there is a prefix transport.* that need to added to all transport properties.

my original uri was:

failover://(tcp://A,tcp://B)?randomize=true&startupMaxReconnectAttempts=1&timeout=2000

and now my URI is (pay attention on transport.* prefix):

failover://(tcp://A,tcp://B)?transport.randomize=true&transport.startupMaxReconnectAttempts=1&transport.timeout=2000

which is working and I handle the exception thrown and continue with my App.

Enjoy

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.