views:

49

answers:

1

I'm trying to write a durable WCF service, whereby clients can handle that the server is unavailable (due to internet connection, etc) gracefully.

All evidence points to using the MSMQ binding, but I can't do that because my "server" is the Azure cloud, which does not support MSMQ.

Does anyone have a recommended alternative for accomplishing durable messaging with Azure?

EDIT: To clarify, its important that the client (which does not run on Azure) has durable messaging to the server. This means that if the internet connection is unavailable (which may happen often due to it being connected on 3G cellular), messages are stored for delivery locally.

Azure Queuing makes no sense because if the internet was reliable enough to deliver the message to the Azure queue, it could have just as easily delivered to the service directly.

A: 

I would suggest some implementation that uses Azure queues. Basically, just put your "request" in a queue, read the queue, try to make the request, if the request succeeds delete the message from the queue, if not don't delete the message. The azure queue has a setting called Visibility timeout. This sets how long the message is hidden from potential future callers. So in the scenario I listed above, if you set your visibility timeout to 5 minutes your retries would occur every 5 minutes. See these links for more information:

Nathan Totten
Azure's Queue Service doesn't guarantee reliability. Additionally its over the internet, which means it isn't durable because my client might not have internet.
David Pfeffer
By client do you mean your azure server? If that is the case, then azure queues are the best you are going to get. There is nothing else in azure that supports anything close to this scenario. You can build solutions on top of the azure queue that will handle failures, etc. Frankly though, the azure services are build more for scalability than reliability. I build large scale apps on azure and basically, we just tolerate a small level of failure in order to create systems that are extremely scalable.
Nathan Totten
No, I have separate clients trying to connect to a WCF service hosted on the cloud.
David Pfeffer
Okay, well now that you have edited your question this makes sense. The way it was written when I answered it, Azure Queues were the correct answer.
Nathan Totten