You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Martin C." <ma...@gmx.at> on 2010/02/12 10:59:21 UTC

ActiveMQ-CPP Failover transport blocks in interrupted mode

Hi,

I am using the failover transport with an URL constructed like the
following:

url << "failover://(tcp://" << broker.ip << ":" << broker.port << ")?" <<
"randomize=false"
        << "&connection.sendTimeout=5000" <<
"&maxReconnectDelay=5000&timeout=3000";

I tried unexpected broker failures by simply dropping packets on the
firewall in the middle of a session.

In a simple testing program, where I send pings, I get the following output

563089 DEBUG OnlineStateHandler   null - Sent ping.
DEBUG OnlineStateHandler   null - Sent ping.
DEBUG OnlineStateHandler   null - Sent ping.
DEBUG OnlineStateHandler   null - Sent ping.
ERROR OnlineStateHandler   null - Failed sending ping: 0xb4f0c860
ERROR OnlineStateHandler   null - Failed sending ping: 0xb4f02cd0
ERROR OnlineStateHandler   null - Failed sending ping: 0xb4f0bd88
ERROR OnlineStateHandler   null - Failed sending ping: 0xb4f0e180
603037 WARN MyTransportListener   null - Transport interrupted!
604097 ERROR OnlineStateHandler   null - Failed sending ping: 0xb4f11e70
981046 ERROR OnlineStateHandler   null - Failed sending ping: 0xb4f12068
<HANGS HERE>

After this, the call to send() hangs, instead of timing out due to either
connection.sendTimeout or timeout. This is rather unfortunate for me,
because possibly "infinite" hangs are not what I want, but want to switch to
some sort of "offline" handling.

Anybody got a hint for me?

Best regards,
Martin
-- 
View this message in context: http://old.nabble.com/ActiveMQ-CPP-Failover-transport-blocks-in-interrupted-mode-tp27561136p27561136.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ-CPP Failover transport blocks in interrupted mode

Posted by "Martin C." <ma...@gmx.at>.

Martin C. wrote:
> 
> After this, the call to send() hangs, instead of timing out due to either
> connection.sendTimeout or timeout. This is rather unfortunate for me,
> because possibly "infinite" hangs are not what I want, but want to switch
> to some sort of "offline" handling.
> 
> Anybody got a hint for me?
> 

Ok, it seems I am missing a soConnectTimeout=3000000 on the tcp:// part of
the failover url.

With the following URL is acceptable for me.
url <<
  "failover://"
  <<(tcp://" << broker.ip << ":" << broker.port 
  << "?soKeepAlive=true&soConnectTimeout=3000000)?" 
  << "randomize=false"
  << "&connection.sendTimeout=5000"
  << "&maxReconnectDelay=5000&timeout=3000"

Best regards,
Martin
-- 
View this message in context: http://old.nabble.com/ActiveMQ-CPP-Failover-transport-blocks-in-interrupted-mode-tp27561136p27561784.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.