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

Paul Gale commented on AMQ-4674:
--------------------------------

I think something has gone awry here. This implementation of a 'grace period' 
doesn't really help. 

What I am observing, after configuring the grace period with a value of 1.5, is 
that when a client connects (simplified):

CONNECT
heart-beat:5000,0

the broker responds with:

CONNECTED
heart-beat:0,7500

which is incorrect. The grace period multiplier should NOT affect the broker's 
response. The broker should have responded with 5000. 

The client therefore honors the broker's inflated interval (per the STOMP spec) 
and sends a read check every 7500ms. 

The broker, meanwhile, applies the grace period multiplier, a second time, to 
its inflated read check interval. In this case, it now performs a read check 
every 11250ms (as shown in the DEBUG logging of the AbstractInactivityMonitor).

With the client idle the broker's activemq.log contains TRACE log entries that 
read "A receive is in progress" every 11250ms. I presume this is the 
ReadCheckTimer handling the read check sent from the client? If so, the log 
output could be a little more descriptive.




                
> ActiveMQ 5.x does not support the notion of a grace-period for heart beats as 
> supported by the STOMP protocol
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-4674
>                 URL: https://issues.apache.org/jira/browse/AMQ-4674
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.8.0
>            Reporter: Paul Gale
>            Assignee: Timothy Bish
>              Labels: easyfix
>             Fix For: 5.9.0
>
>
> Regarding the configuration of heart beating the STOMP protocol spec states:
>     "- because of timing inaccuracies, the receiver SHOULD be tolerant and 
> take into account an error margin"
> However, it appears that ActiveMQ 5.x is not tolerant of any error margin. 
> Despite the fact that the spec says SHOULD rather than MUST it would make the 
> implementation of STOMP clients easier if the error margin was published.
> As the broker aggressively enforces the heart beat timeouts false failover 
> attempts can result.
> Apparently Apollo supports an error margin of 1.5x the configured heart beat. 
> If it could be made configurable that would be even better! 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to