public void Handler(MyEvent event)
{
IdempotentAction();
Bus.Publish<MyEvent2>();
}
However, applicability is very limited. If you use any other azure service that doesn't support transactions (which is all of them to be honest), or you need more than 1 transactional resource (like 2 db connections, or 2 sb queue senders, etc...), then it is probably better to accept the fact that azure is a non transactional world and build idempotency into your application.
Ah,
Thanks for clearing that up for me. I guess I was looking for any hope of an easy way out for my specific scenario and rushed to the wrong conclusion. I am implementing a credit card acquiring feature, and the provider (as most providers do) makes it very hard to create an idempotent handler on my end.
Morten
Oh, I wasn’t even dreaming of something sophisticated like that. I would be satisfied if I could just retry an auth request, and if it was already processed (based on a payment request ID I set), I would get a message that this was a duplicate along with the result from the actual processing. But I am even having a hard time getting a method where I can check the status of a payment based on the ID I set, and if it doesn’t exist go ahead and submit a request.
Morten Petterøe
From: particula...@googlegroups.com [mailto:particula...@googlegroups.com]
On Behalf Of Yves Goeleven
Sent: 26. februar 2015 10:52
To: particula...@googlegroups.com
Subject: Re: [particularsoftware] Re: Reliable messaging without DTC in Azure
There is a good reason why service providers make it so hard on you (MS storage service or whatever is also a service provider and is no exception to this)
Resources locked by external parties for an extended/unknown period of time (which is what transactions actually are), make great targets for denial of service attacks, just grab enough of them and the service provider will stop working or its operations become extremely expensive which will also put them out of business...
So the more we go to a decentralized software system where parts of the system are operated by different parties (cloud, mobile, iot, all seem to point in this direction), the more this will become an issue and force us to change the way we think of building our systems...