[rabbitmq-discuss] RabbitMq with WCF Transaction
Emile Joubert
emile at rabbitmq.com
Wed Feb 27 15:19:33 GMT 2013
Hi,
On 27/02/13 13:25, Hadas wrote:
> I try to use transaction in wcf by adding
> "[OperationBehavior(TransactionScopeRequired = true)]" to functions in
> my interface.
> What I can see is that when an error happens the message return to the
> queue, but only once. That means if an error occurs second time the
> message is lost.
>
> Do I miss something or what I need to change in order to retry till no
> error occurs?
I confess ignorance about how transactions work in WCF, so I'm not
entirely sure whether they are designed to prevent message-loss in the
way that you expect. My reading of RabbitMQInputChannel.Receive() in the
RabbitMQ WCF binding is that messages are acknowledged immediately after
being decoded and will therefore not be available from the broker after
that point if the transaction needs to roll back.
It is possible to deliver messages to clients with "at-least-once"
guarantees by using the .net client library and making use of
acknowledgements and durability. The 2nd tutorial contains a relevant
discussion.
-Emile
More information about the rabbitmq-discuss
mailing list