[rabbitmq-discuss] Channel and basicAck
Matthias Radestock
matthias at lshift.net
Thu Sep 17 10:47:19 BST 2009
Philippe,
Philippe Kirsanov wrote:
> I'm using Java library and basicConsume to receive messages.
>
> Messages are retrieved and queued without ack and I need to ack messages
> before I start process it. Since channels are not thread-safe and I
> noticed that delivery tag is channel-specific (I cannot use different
> channel to ack message received by other channel), what is proper way to
> ack messages? Channel that receives messages leaves in Connection thread
> (this is the way Java lib works), but ack needs to be sent from another
> thread.
The use of a channel by the connection thread is thread-safe. So you
only have to ensure that there aren't multiple *application* threads
interacting with the channel concurrently.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list