You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Andrea Marziali (JIRA)" <ji...@apache.org> on 2016/04/04 00:56:25 UTC

[jira] [Commented] (AMQ-6185) Keep-Alive does not work in broker network when connected over HTTP

    [ https://issues.apache.org/jira/browse/AMQ-6185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15223542#comment-15223542 ] 

Andrea Marziali commented on AMQ-6185:
--------------------------------------

It seems to be actually a bug of InactivityMonitor.
In fact, specifically for Http transport, the inactivity monitor skips all the wire format information. 
In this case the connection checker task is never canceled and this causes the connector to be stopped after 30 seconds because the monitor thinks that the connection has never been established.

In order to not wait for the issue to be fixed, you can overcome the problem by turning off connection checker (that does not make sense for http transport). Read and write checks for keep alive will by the way work as designed.

Just add connectAttemptTimeout=0 to your transport options (also in network connectors)

Cheers

Andrea

> Keep-Alive does not work in broker network when connected over HTTP
> -------------------------------------------------------------------
>
>                 Key: AMQ-6185
>                 URL: https://issues.apache.org/jira/browse/AMQ-6185
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: networkbridge
>    Affects Versions: 5.13.1
>         Environment: all OSs
>            Reporter: Jiri Formanek
>              Labels: http, keepalive, networkBridge, networkConnector
>
> The keep-alive mechanism does not work (no keep-alives are sent), when the connections go over HTTP layer.
> The InactivityMonitor closes then the connection and new connection to target is established. This repeats every 30 seconds (the default time out).
> E.g.: Let's have a simple broker network. Machine A connects to machine B with duplex network bridge over HTTP...
> Machine A config:
> <networkConnector duplex="true" uri="static:(http://machineB:61617)" name="bridgeToB" />
> Machine B config:
> <transportConnector name="http" uri="http://0.0.0.0:61617?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
> When the transport layer is changed to e.g. TCP then keep-alive works and the connection is persistent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)