eShopOnDapr icon indicating copy to clipboard operation
eShopOnDapr copied to clipboard

How to atomically persist state and send events (e.g. ProductPriceChangedIntegrationEvent) ?

Open vadim-tychonoff opened this issue 2 years ago • 0 comments

It seems that this sample app doesn't demonstrate how to achieve atomicity between database updates and event publishing, which is essential in real-life projects. In the original eShopOnContainers app, the Catalog service publishes ProductPriceChangedIntegrationEvent after persisting it into IntegrationEventLog table, in UpdateProductAsync method. But in this sample, there's no such event, and I can't find any implementation of the outbox pattern either.

Since Dapr doesn't seem to provide the outbox pattern implementation out-of-the-box (no pun intended), it'd be great to include an example that illustrates how to deal with the atomicity issue.

vadim-tychonoff avatar Dec 29 '22 11:12 vadim-tychonoff