Hello!
Currently, Blazor Web App stores all the subscription callbacks that need to be fired when an integration event is handled in a dictionary which has the buyer ID as the key. Integration events contain the buyer ID in the payload that is then used to correctly trigger the corresponding callback.
But if we scale out the Blazor Web App to two instances after the Azure deployment, some integration events might not be properly handled because of the Azure Service Bus implementing the competing consumers pattern.
Example:
Blazor Web App instance A --stores---> subscription callback for buyer ID 1
Blazor Web App instance B --stores---> subscription callback for buyer ID 2
Both instances are using the same topic subscription to receive messages.
An OrderStatusChangedToCancelledIntegrationEvent is published to the Azure Service Bus topic for buyer ID 1, but the message is processed by Blazor Web App instance B. No callback will be called because Blazor Web App instance B doesn't have any subscription registered for buyer ID 1.
How to handle this scenario?
Best regards