[rabbitmq-discuss] Channel.basicPublish to a non-existent exchange does not throw

Jonathan Halterman 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.

- jonathan


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.
>
> Matthias.
>
> ______________________________**_________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.**rabbitmq.com<rabbitmq-discuss at lists.rabbitmq.com>
> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131021/2f0df61d/attachment.htm>


More information about the rabbitmq-discuss mailing list