Pika channel stops consuming after a while

327 Views Asked by At

I have a Pika channel listening on a RabbitMQ queue:

credentials = pika.PlainCredentials(user, passwd)
connection = pika.BlockingConnection(
        pika.ConnectionParameters(host=host,
                                  port=port,
                                  credentials=credentials,
                                  heartbeat=0))
channel = connection.channel()

channel.basic_consume(on_message_callback=callbackFun,
                      queue=queue,
                      auto_ack=True)

channel.start_consuming()

Everything works great for a while until it just stops consuming for an unknown reason. Restarting the pod solves the problem, so it seems like some timeout issue I can't find (note that heartbeat is disabled).

How can I avoid this behavior?

0

There are 0 best solutions below