FAQ
Does anybody know if using the Java client I'm allowed to acknowledge a
message on a different thread than which picked up the message?

More generally can I use a channel from a different thread?

I think I read that you should not use a channel simulatenously across
threads?
--
View this message in context: http://old.nabble.com/Can-I-acknowledge-a-message-in-a-separate-thread-to-that-which-received-the-message--tp31562934p31562934.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

Search Discussions

  • Robert Nicholson at May 7, 2011 at 1:01 am
    Does anybody know if using the Java client I'm allowed to acknowledge a message on a different thread than which picked up the message?

    More generally can I use a channel from a different thread?

    I think I read that you should not use a channel simulatenously across threads?
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110506/7f612ce2/attachment.htm>
  • Matthew Sackman at May 7, 2011 at 6:50 am

    On Fri, May 06, 2011 at 08:01:00PM -0500, Robert Nicholson wrote:
    Does anybody know if using the Java client I'm allowed to acknowledge a message on a different thread than which picked up the message?
    Behaviour is likely undefined in this case.
    More generally can I use a channel from a different thread?
    It's not recommended, as the API guide says -
    http://www.rabbitmq.com/api-guide.html#channel-threads

    Matthew
  • Emile Joubert at May 10, 2011 at 11:59 am
    Hi Robert,
    On 07/05/11 00:18, steffi2 wrote:

    Does anybody know if using the Java client I'm allowed to acknowledge a
    message on a different thread than which picked up the message?
    Yes it is possible, but only if the threads use the same channel.
    More generally can I use a channel from a different thread?
    Yes, but you will need to synchronise access to the channel appropriately.
    I think I read that you should not use a channel simulatenously across
    threads?
    Indeed. Avoid this if possible. You risk introducing races and protocol
    framing errors.



    -Emile

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedMay 6, '11 at 11:18p
activeMay 10, '11 at 11:59a
posts4
users4
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase