Answer the question
In order to leave comments, you need to log in
Why is there a disconnect with rabbitmq during a long task?
credentials = pika.PlainCredentials(rabbitmqConf['user'], rabbitmqConf['password'])
parameters = pika.ConnectionParameters(rabbitmqConf['host'], rabbitmqConf['port'], '/', credentials, socket_timeout=20)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue=rabbitmqConf['queueName'], durable=True)
channel.basic_qos(prefetch_count=1)
channel.basic_consume(callback, queue=rabbitmqConf['queueName'])
channel.start_consuming()
ch.basic_ack(delivery_tag=method.delivery_tag)
(-1, "ConnectionResetError(10054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10054, None)")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question