[rabbitmq-discuss] Heartbeats in Ruby

Alan Antonuk alan.antonuk at gmail.com
Wed Nov 21 15:57:39 GMT 2012


Looking for a bit more information on these new heartbeats that v3
implements:

- For the connection.tune method that gets sent to the client every
${heartbeat} seconds:
* Does this method always get delivered on channel 0?
* Is there a timeout that the broker has waiting for a connection.tune-ok
response?
* If this timeout occurs what happens?
* What if the client never replies with a connection.tune-ok? (The client
doesn't really use channel 0 after connecting, so it doesn't really violate
the statemachine, until the client tries to disconnect).


I'm asking this in the context of rabbitmq-c which does not have a thread
associated with each connection so that things like heartbeats can be
easily serviced.

-Alan

On Wed, Nov 21, 2012 at 10:36 AM, Matthias Radestock
<matthias at rabbitmq.com>wrote:

> Michael,
>
> On 21/11/12 15:19, Michael Klishin wrote:
>
>> 2012/11/21 Matthias Radestock <matthias at rabbitmq.com
>> <mailto:matthias at rabbitmq.com>**>
>>
>>
>>     However, some clients do not implement the AMQP spec correctly and
>>     ignore the server's suggestion. I don't know whether ruby-amqp is
>>     one of them.
>>
>> If this value is sent with connection.tune-ok, it is a one line change
>> to make amqp gem use it.
>>
>
> The server sends its suggested value with connection.tune. The client is
> expected to send back a tune-ok with the values it insists on using.
>
>
>  Right now it is used
>> but I see that client-side default takes precedence, making the
>> server-sent value effectively not used.
>>
>
> The "official" clients take the minimum of the client and server value,
> special-casing on 0. See, e.g. http://hg.rabbitmq.com/**
> rabbitmq-java-client/file/**09504eed7022/src/com/rabbitmq/**
> client/impl/AMQConnection.**java#l377<http://hg.rabbitmq.com/rabbitmq-java-client/file/09504eed7022/src/com/rabbitmq/client/impl/AMQConnection.java#l377>
> .
>
>
> Matthias.
> ______________________________**_________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121121/0bf51110/attachment.htm>


More information about the rabbitmq-discuss mailing list