dotnet-architecture / eShopOnContainers

Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.

Home Page:https://dot.net/architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do multiple integration event handlers guarantee the idempotence of this integration event

lcheny-qwq opened this issue · comments

In UserCheckoutAcceptedIntegrationEventHandler, I see that the IdentifiedCommand is created to ensure that consumption is not repeated.
var requestCreateOrder = new IdentifiedCommand<CreateOrderCommand, bool>(createOrderCommand, @event.RequestId);

When CheckoutAcceptedIntegrationEvent have more than one handler, and requires each handler not repeat consumption, create IdentifiedCommand in each handler, do not conflict? Because they both use the same @event.RequestId as the Id of the IdentifiedCommand.

Thank you very much.