[rabbitmq-discuss] Exchange disappear

Rosa, Andrea andrea.rosa at hp.com
Thu Nov 24 14:18:17 GMT 2011


Hi 


> -----Original Message-----
> From: Marek Majkowski [mailto:majek04 at gmail.com]
> Sent: 24 November 2011 12:24
> To: Rosa, Andrea
> Cc: rabbitmq-discuss at lists.rabbitmq.com
> Subject: Re: [rabbitmq-discuss] Exchange disappear
> 
> >> Make sure the exchange exists at that point - maybe put
> >> `exchange_declare`
> >> before the `publish` ?
> >>
> >
> > I am sure that the publish command is called after the
> exchange_declare, because I can see the process work correctly for the
> 95% of my messages, but sometimes I have got this error.
> > Maybe some race condition?
> 
> Quite possible - but rather on the client side. Just a quick question:
> you're not using `no_wait`, right?
> 

no_wait=False

> > The exchange has auto_delete=true, so maybe a possible scenario could
> be:
> > 1 try to publish a message
> > 2 the exchange is not yet created
> 
> That is going to crash the AMQP channel, you can't publish to non-
> existing
> exchange.
> 
The channel can crash for some network problems or some issues with the socket, isn't it?


> > 3 second attempt to publish a message which generates the second
> exception (503)
> > 4 the message is not published and the exchange is created.
> > I verified also that that exchange has not a binding.
> 
> Publishing to existing exchange will always succeed, bindings doesn't
> make
> a difference.

> `auto-delete` exchange is deleted when last queue unbinds, is that
> what you're doing?

Yes, that's my case

--
Andrea


More information about the rabbitmq-discuss mailing list