[rabbitmq-discuss] WCF Do not act if failed to process

Emile Joubert emile at rabbitmq.com
Thu Oct 21 15:25:05 BST 2010


Hi Mamu,

On 16/10/10 01:46, mamu wrote:
> 
> WCF client library act's as soon as it read message from queue. Below is line
> called as soon as message got read from queue.
> 
>                 m_messageQueue.Model.BasicAck(msg.DeliveryTag, false);
> 
> It is going to call service after message is removed from rabbitmq, and if
> service has some component down it's going to fail in executing actual
> implementation in service.
> 
> I would like to change this behavior to like, call basicact only if message
> was processed successfully by wcf service.
> 
> Any one could suggest how can i change rabbitmq wcf implementation to
> achieve above? 
> 
> 
> Also would like to hear you experience around handling above case.


I suggest you investigate System.ServiceModel.Channels.ReceiveContext to
exercise greater control over precisely when acknowledgements are sent.
This is only available in .NET 4 though. From the docs:

"...receive context allows a service to control when it sends an
acknowledgement message or it can indicate a problem by sending a
negative acknowledgement message."


Regards

Emile


More information about the rabbitmq-discuss mailing list