Given an enterprise systems architecture that relies on messaging capabilities of Azure Service Bus, in the event of corrupted system state, would it be possible to replay the commands to regenerate the system state?
Say there have been commands sent to the system, which are processed by the underlying microservices but due to a bug in a service, the resulting system state is not correct. We fixed the bug and deployed the new version of the service. Now we would like to clear the current state and recreate it by replaying the commands received by the system earlier.
As far as I understand, replaying messages is a concept being mentioned in event sourcing. When I search in the context of message brokers for enterprise system design such as Azure Service Bus, this capability does not seem to be common. Solace seem to support message replay according to this article. Though, we prefer to use Azure Service Bus (SaaS) rather than Solace (which would mean having to acquire IaaS resources) as the message broker.
The only solution I can think of is to implement a service as sort of an "event hub" which listens to all messages, serializes them, persists them. Then in the event of having to reprocess messages, it will deserialize messages (probably a selection of them) and send them back to Azure Service Bus following AMQP using a client library like AMQP.Net lite.
Are there any tools we can use instead of building such a service ourselves, which works together with Azure Service Bus?
Thanks in advance!