[rabbitmq-discuss] RabbitMQ problem

Matthias Radestock matthias at lshift.net
Fri Sep 26 05:48:11 BST 2008


Valentino,

Valentino Volonghi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi, I think I've found another bug in RabbitMQ.
> 
> Basically:
> * create durable exchange and durable queue
> * start a transaction
> * send a couple of messages
> * with the transaction still open delete the queue that was matching
> * commit the transaction
> * send some other messages
> 
> - -> rabbitmq will fail (but this is not the problem) with the following  
> error:
> 
> =ERROR REPORT==== 25-Sep-2008::17:32:28 ===
> connection <0.155.0> (running), channel 1 - error:
> {commit_failed,
>      [{exit,
>           {noproc,{gen_server,call,[<0.169.0>,{commit,{{2,<0.161.0>}, 
> 36}}]}}}]}
> 
> =ERROR REPORT==== 25-Sep-2008::17:32:28 ===
> Non-AMQP exit reason '{commit_failed,
>                            [{exit,
>                                 {noproc,
>                                     {gen_server,call,
>                                         [<0.169.0>,
>                                          {commit,{{2,<0.161.0>}, 
> 36}}]}}}]}'
> 

This behaviour is intentional. IMO it would be wrong for the tx commit 
to succeed when a participating queue has been deleted. The AMQP spec 
doesn't specify what should happen in this case though, so we simply 
throw an exception which in turn will cause the connection to be closed 
with an INTERNAL_ERROR.

> ====> Here's the error then: rabbitmq simply stops delivering messages  
> and I think
> it actually loses all the messages that it receives after the failing  
> commit.

That would be because the connection has been closed.

> I tried adding code that in case of a failed commit runs the rollback  

Since the connection will have been closed there is no point in doing that.

> but apparently I don't even receive the failed commit message.

That is strange. What client are you using?


Matthias.




More information about the rabbitmq-discuss mailing list