Hi, > I have recently started looking into AMQP and came across many doubts.
Are you referring to version 0-8 of the protocol, or have you been looking at the 0-10 wiki? 0-10 is signficantly different hence this is very important. > I have been having some doubts about reliability and transaction support > in AMQP. In general, how are transactions handled in AMQP for the > various use cases? For example, when the broker receives a > persistent-message and then crashes before it stores it on the external > DB, how will this affect the recovery? Also, this will make the > publisher to believe that the message wasn't received by the broker > since he will get a connection exception and will resend it. 0-8/9 only really support "at least once" delivery guarantees, not "once and only once". So yes, a client could do a commit, the broker could process it and the client could die before receiving or processing the commit-ok, and not be aware that the commit had been processed successfully. I am not familiar with 0-10 but I know that this was a high priority to improve. > Alternatively, if the crash occurs after the message is put in > persistence or half way in the process. The client will behave in the > same way and resend the message after a broker restarts. But since the > message has been put into persistence, the broker will send it too after > it restarts. I mean, this is just one possible failure that occurred to > me and wasn't very clear from the spec. Another case would be, say for > pub-sub, when a persistent message is supposed to be published on 3 > queues, and the broker fails after putting in on 2. In this case, the acknowledge mode is key. Again, you can be sure of at least once delivery. > Also, it seems that the boundaries of transactions is not very well > defined by the spec. For example, are the declare, property-change (say > setting of mode), delete, etc operations for queues, exchanges, bindings > all covered inside a transaction and deleted in case of an abort OR only > the messages and acknowledgements covered. And if these issues not very > clearly stated in the spec, won't this create a lot of uncertainty as > far as things like interoperability is concerned? Only the messages and acknowledgements are covered by transactions. RG
