[rabbitmq-discuss] rabbitmq-erlang-client: How to configure connection's heartbeat ?

Vlad Alexandru Ionescu vlad at rabbitmq.com
Thu Sep 2 14:14:12 BST 2010


Indeed, upgrading just the client(s) will break things for sure, since 
the clients now speak AMQP 0-9-1.
We do recommend upgrading all clients plus the server to version 2.0.0. 
There are many new features in it; including persistence to disk.
Note that the latest versions of broker and erlang client on default do 
not work together. We are working on fixing it. Use tag rabbitmq_v2_0_0 
instead, if you check source out from hg.


Rgds,
Vlad.


On 09/02/2010 02:03 PM, Guillaume Perrot wrote:
> Hi,
> I already use #amqp_params, but the record definition is missing the 
> heartbeat field:
>
> -record(amqp_params, {username     = <<"guest">>,
>                       password     = <<"guest">>,
>                       virtual_host = <<"/">>,
>                       host         = "localhost",
>                       port         = ?PROTOCOL_PORT,
>                       ssl_options  = none}).
>
> Apparently I use an outdated version of the client (hg clone --rev 
> 825eceaca84c http://hg.rabbitmq.com/rabbitmq-erlang-client/) and I am 
> not sure I can upgrade it without upgrading the server and codegen.
> (hg clone --rev b1089fcc31b7 http://hg.rabbitmq.com/rabbitmq-server/
> hg clone --rev a62e87645861 http://hg.rabbitmq.com/rabbitmq-codegen/)
>
> I'll try to update the whole, hoping migrating from the time rabbitmq 
> implemented the 0.8 version of the spec does not break anything (we 
> also have Java clients to update).
>
> 2010/9/2 Vlad Alexandru Ionescu <vlad at rabbitmq.com 
> <mailto:vlad at rabbitmq.com>>
>
>
>     Hi,
>
>
>     You can use the amqp_connection:start_network/1 function. You pass
>     an #amqp_params{heartbeat = TimeoutSec} parameter. For example:
>
>     Connection = amqp_connection:start_network(#amqp_params{heartbeat
>     = 5}).
>
>     ... to start a network connection with 5 seconds heartbeat.
>
>     Make sure you include amqp_client.hrl.
>     There are quite a few things you can tweak through #amqp_params{}.
>
>
>     Rgds,
>     Vlad.
>
>
>
>
>     On 09/02/2010 01:47 PM, Guillaume Perrot wrote:
>>     Hello,
>>     I could'nt figure out how to configure the connection's heartbeat
>>     using rabbitmq-erlang-client.
>>     In the Java lib it was easy to do so by calling
>>     ConnectionParams.setRequestedHeartbeat(), I did not find an
>>     equivalent feature in rabbitmq-erlang-client.
>>     Thanks in advance.
>>
>>
>>     _______________________________________________
>>     rabbitmq-discuss mailing list
>>     rabbitmq-discuss at lists.rabbitmq.com  <mailto:rabbitmq-discuss at lists.rabbitmq.com>
>>     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/20100902/92307067/attachment.htm>


More information about the rabbitmq-discuss mailing list