[rabbitmq-discuss] Channel.basicPublish to a non-existent exchange does not throw
jhalterman at gmail.com
Mon Oct 21 21:26:45 BST 2013
Yea, racy indeed. I actually don't think we need to wait on a
ShutdownListener since the basicPublish will eventually fail with
AlreadyClosedException. That's fine as long as the Connection isn't
shutdown as a result, which Steve mentioned in another thread
(AlreadyClosedException always sets hardError...) is what should happen but
which I haven't seen. Since I don't really have a fair chance to know that
the Channel has been closed before getting an AlreadyClosedException,
ideally the Connection wouldn't be closed as a result.
On Mon, Oct 21, 2013 at 12:25 PM, Matthias Radestock
<matthias at rabbitmq.com>wrote:
> On 21/10/13 20:20, Jonathan Halterman wrote:
>> I'm guessing I have to
>> fallback to Channel.isOpen or wait for the ShutdownListener to be called?
> That's racy. How long would you wait?
> The reason that basicPublish doesn't return an error is because doing so
> would require waiting for a response from the server, thus making
> basicPublish synchronous and destroying performance.
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss