So I have a customer with a number of Azure Service Bus queues and uses them to exchange messages with it’s respective customers who are each represented by 1 queue. At times messages for these customers end up on ASB’s deadletter queues as is not necessarily uncommon. My customer wants to offer it’s customers a form of self-service to move their own deadletters back to their processing queue to reduce support that it needs to offer on this.
Ideally I would think of using ServicePulse and exposing this as a facility but I’m not sure if it will offer enough of a tailored and intuitive experience for the customers of my customer. Nor am I sure that I will be able to expose just a subset of features because (1) they should only be able to see their own messages (= filtering on source queue) and (2) should only be able to perform certain actions like retry of a message but all else would need to be blocked.
Therefore I was thinking that perhaps it would be a good idea to build a customized app (a “ServicePulse light” so to speak) that has particular styling and customized functionalities tailored to the customers of my customer. Without necessitating diving into the ASB queues directly I thought consuming the ServiceControl API may be an alternative that offers a better integration with the NSB ecosystem but I remember reading somewhere, sometime ago, that this is not a good practice. I remember reading that the api was meant to be consumed only by ServicePulse and ServiceInsights and that no guarantees could be given about it’s stability. This would be an obvious counterargument not to go into this direction.
Given this situation and ideas what could be alternative ways to achieve what my customer wants to offer it’s customers?
Thanks for thinking about using ServicePulse for this. You are right however that we advise against doing this. Not so much for the stability of the API, although that could be a valid reason as well. But I would validate the reason why your customer wants this functionality.
Imagine that your system is running under peak load and needs to process a lot of important messages. And suddenly someone decides to retry/replay a couple of thousand messages that all suddenly get added to your queues. This could seriously influence the ‘regular’ throughput of messages.
Another reason is that we’ve seen other customers (kind of) abuse the retry and replay functionality of NServiceBus and ServicePulse for exceptions that should in fact be dealt with through business rules and processes. For example, the fact that a credit card can’t be charged because it expired or because there wasn’t enough money. This is not a technical problem and should not be solved by sending the message to the error (or deadletter) queue. Rather it should be part of the process and someone should be informed.
So basically, exceptions that occur because there’s a deadlock or because the database is under maintenance, those should be forwarded to the error queue. Now, if a database is under maintenance and messages get send to the error queue because of this, then it’s possible (with a high throughput or multiple endpoints using the same database) that in a short time, thousands of messages end up in the error queue. If a customer suddenly decides to retry all of them, that could influence the regular behavior of your system and its throughput.
Having said that…
It is indeed not possible to expose a subset of features in ServicePulse
We don’t provide any filtering within ServiceControl specifically to customers, if you’re looking for that. Every customer would require their own version of ServiceControl, if you need that.
It is possible we update the ServiceControl API, but that is not extremely likely. Currently, ServiceControl and ServicePulse are upgraded independently from each other, which means we need to keep both backward compatible as well. But anything can happen however, I can’t make any promises.
So with this knowledge, you have to decide if something like you suggested, would benefit your customer. Particular Software currently hasn’t got anything like that available. On another note, are you familiar with message forwarding in ServiceControl or ServiceControl Events? Maybe they can help you in some way as well?