[rabbitmq-discuss] Java client transaction with basic.consume

tsuraan tsuraan at gmail.com
Mon Apr 6 19:15:25 BST 2009


My desired workflow is:

basicConsume(...)
forever() {
consumer.nextDelivery()
channel.txSelect()
channel.basicAck(...)
for(msg in some messages that depend on the delivered message) {
  channel.basicPublish(msg)
}
channel.txCommit()
}

My understanding (probably wrong) is that attempting to do blocking
calls (like txSelect) on the channel being used by my consumer will
cause a deadlock.  The documentation for QueueingConsumer says that it
has straightforward blocking semantics, but I'm not sure what that
means.  Is there a way to have my desired workflow using basicConsume,
or do I need to do basicGet?




More information about the rabbitmq-discuss mailing list