Assuming that one event stream is a transation boundary and aggregate is a write-model to enforce invariants, can i have two or more aggregates dedicated to one event stream? If one big aggregate is not an option by perfomance or overcomplicated design reasons?
For example i have following domain model represented by one event stream:
{
"Products": [{
"Id": 1,
"Name": "Call-Centre",
"Services": [
{
"Id": 10,
"Name": "CloudStorage",
"Price": 250,
"Discount": 100
}
]
}]
I need to enforce two invariants. First: services per product must be unique (by name). Second: service discount value can't be more than actual price. Now i consider to use two aggregates: ProductAggregate which contains Services collection for enforcing first invariant; ServiceAggregate which contains only Service info for enforcing second one. Are there some pitfalls in my solution?