Hi!
Take a look at this simple example:
while True:
new_files = get_new_files_to_process()
if new_files:
message = build_message(new_message)
producer_channel.basic_publish(exchange, routing_key, message)
Suppose for a long period of time there are no new files, hence, nothing to publish. Then I notice the publisher connection ioloop does not get the chance to send heartbeats to the server.
In this case I work around it catching the dropped connection error and reestablishing it, but it feels hacky (and produces a lot of error logs).
Is there a way of ensuring that the producer has the chance to send heartbeats during those periods when basic_publish is not called?
Thanks in advance
Marcos