Skip to content

Commit 8de3087

Browse files
author
Chris Lyon
committed
Fixed double-ACK bug, causing AMQP PRECONDITION_FAILED error
- haigha BasicClass.consume() should be called with no_ack=False (see https://www.rabbitmq.com/amqp-0-9-1-reference.html#class.basic for reference) - Minor typo fix
1 parent c0f794b commit 8de3087

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

msgflo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def handleInput(msg):
6969

7070
if 'in' in direction:
7171
channel.queue.declare(queue)
72-
channel.basic.consume(queue=queue, consumer=handleInput)
72+
channel.basic.consume(queue=queue, consumer=handleInput, no_ack=False)
7373
print 'subscribed to', queue
7474
sys.stdout.flush()
7575
else:
@@ -107,7 +107,7 @@ def __init__(self, participant, done_cb):
107107

108108
def _send(self, outport, data):
109109
ports = self.participant.definition['outports']
110-
print "Publising message: %s, %s, %s" % (data,outport,ports)
110+
print "Publishing message: %s, %s, %s" % (data,outport,ports)
111111
sys.stdout.flush()
112112
serialized = json.dumps(data)
113113
msg = haigha_Message(serialized)

0 commit comments

Comments
 (0)