Durable Messaging Is Not Enough
I’ve been sitting on this post for a while, waiting, before outlining all the kinds of problems durable messaging doesn’t solve, I wanted to have a solution handy. Harry Pierson begins to outline the goodness that durable messaging brings to SOA, and in a later post on idempotence describes in general terms how it ties back into durable messaging and transaction - in essence describing a saga. Let’s do this in story form.
Since you’re concerned that maybe your shipping company’s servers may be down for some kind of planned (or unplanned) maintenance just as you’re trying to fulfill orders, you use a durable messaging solution there. What happens is that messages get written to disk on your end, and later the messaging tries to transfer the messages until it succeeds. So what’s wrong with that?
Well, let’s say that the shipping company’s servers went up in smoke (true story - broken down air conditioners + poor ventilation, you get the picture). Those servers aren’t going to be coming back online any second now. So, you have all these order messages buffering on your disk. Taking into account all the data, meta-data, XML, SOAP, encryption and everything, we may get up to 1MB per message.
And now’s holiday season and your company’s selling hand over fist, hundreds of orders per second from all over the world. So that means we’re eating up 100MB of disk per second, that’s 6GB a minute, and in under an hour of our shipping company’s servers going down - so do ours.
Durable messaging - yay? We don’t want to lose those orders, right? In short, durable messaging is an important part of the solution, but it’s not the whole solution.
[Continued next time...]
If you’re impatient and just want the solution, yes, nServiceBus give you all the tools you need.