From @ornoone on Mon Sep 18 2017 12:09:39 GMT+0000 (UTC)
this is a question to understand why the heartbeat feature is not used for all connections.
in fact, we found out that our very small micro-service stack (5 micro-services) was consuming more and more memory of our small rabbitmq server (> 400mb ) for 1 message every minutes.
we found out that more connection (which consume around 16Mb each) was created over the time, without being closed. the «stale» connections was without heartbeat.
I investigated to find that nameko was opening $max_woker connections to the rabbitmq during medium load via get_produced function, but these connections was without the heartbeat parameters, and was not closed after use.
I just ask if this is intended, or if this should be reworked.
after some experiment, it seem the add of heartbeat for get_producer remove the extra connection after the load has passed and thus the memory used by rabbitmq is lower for a small cluster of services.
version for testing:
nameko latest master (commit 286d141af2e0fe3fc5b592228c4cea93ca495d81)
RabbitMQ 3.6.10, Erlang 19.3
Copied from original issue: https://github.com/nameko/nameko/issues/473