开发者

ActiveMQCPP connection.start() hangs up

I'm using ActiveMQ CPP 5.2.3 if it matters.

I have JMS producer that connects using failover transport to JMS network of brokers. When I call connection->start() it hangs up (see AMQ-2114).

If I skip connection start() and call connection->createSession(), than this call 开发者_StackOverflow社区is blocked too.

The requirement is that my application will try forever to connect to broker(s).

Any suggestions/workarounds?

NOTE:

This is not duplicate of here, since I'm talking about C++ and such solutions as embedded broker, spring are not available in C++.


This is normal when the connection is awaiting a transport to connect to the broker. The start method must send the client's id info to the broker before any other operation, so if no connection is present it must block. You can set some options on the failover transport like the startupMaxReconnectAttempts option to control how long it will try to connect before reporting a failure. See the URI configuration page:

http://activemq.apache.org/cms/configuring.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜