[rabbitmq-discuss] Problem with Tx.Commit and/or Pika?
Matt Pietrek
mpietrek at skytap.com
Thu Aug 16 19:31:41 BST 2012
I have a simple, single threaded program using Pika's SelectConnection with
RabbitMQ 2.8.5 that simply listens for request messages and replies to them.
This code generally works - It can receive many thousands of messages
before it croaks. When it does croak, it's with the following error:
*CHANNEL_ERROR - unexpected command while processing 'tx.commit'
*The code looks like this:
def handle_delivery(channel, method, header, body):
print "Received message"
channel.tx_select()
channel.basic_publish(exchange="skytap",
routing_key='foo.bar',
body='reply',
mandatory=True,
properties=BasicProperties(delivery_mode=2))
channel.tx_commit()
channel.tx_select()
channel.basic_ack(delivery_tag=method.delivery_tag)
channel.tx_commit()
More information about the rabbitmq-discuss
mailing list