Comments (3)
Hi @zh6335901,
If you have many Outbox processors you can't process events in parallel because the order of events matters. It will be a problem for your subscriber if he would receive OrderCanceled event and then OrderCrated event.
Even you will solve the problem with processing one event many times using some locking mechanism on the table or more advanced solution like using Rabbit MQ which has "round-robin" by default, the order of published events would be incorrect.
So you should have only one processing instance working at the same time. If you want to have multiple instances, other instances should be inactive. You can achieve this using Single Consumer Rabbit MQ feature: https://www.rabbitmq.com/consumers.html#single-active-consumer As documentation says:
Consuming with only one consumer is useful when messages must be consumed and processed in the same order they arrive in the queue.
from sample-dotnet-core-cqrs-api.
Hi @kgrzybek
You are right. The order of events is important. But if the Outbox processors only have one instance, I am worried about it would be lost the high available.
Maybe i need find a solution that multiple instances but only one working at the same time.
from sample-dotnet-core-cqrs-api.
Thank you for your answer. And your aritcles is help me out
from sample-dotnet-core-cqrs-api.
Related Issues (20)
- Query Handlers and responsabilities HOT 3
- Communication between contexts - Implement RemoveCustomer method that checks if customer has any orders. HOT 2
- "Light" OrderDto HOT 1
- Should we persist this to the database? HOT 2
- Migrations HOT 1
- Problem with context.SaveChangesAsync() after removing objects from List<>
- StronglyTypedIdValueConverterSelector should be Singleton HOT 1
- Product existence check / Asynchronous domain HOT 1
- Outbox pattern maybe lock in OutboxMessages table
- Is it mandatory to use Guid for Id in entity or aggregate? HOT 1
- 1
- Decorator registration is not working with Autofac 6.x HOT 1
- Raw SQL in application layer
- DDD EF Core Remove issue HOT 8
- IDomainEventDispatcher and its implementation class
- Customer as Aggregate
- Ordering of DomainEventNotifications in OutboxMessages table
- Add a license HOT 1
- why not just inject IDbConnection instead of ISqlConnectionFactory? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sample-dotnet-core-cqrs-api.