Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow independently setting the partition key for Cosmos #69

Open
Darren166 opened this issue May 10, 2022 · 0 comments
Open

Allow independently setting the partition key for Cosmos #69

Darren166 opened this issue May 10, 2022 · 0 comments

Comments

@Darren166
Copy link

Although the StreamId is the perfect candidate in most cases for the partition key, it would be of great benefit to us if we could set a correlationId as the key instead.

We have a product running through various domains in a particular order, each of which has its own stream. Each domain is guaranteed to see event playback in order due to streamId being the partition key, but the Process Manager which takes care of moving a product between domains must see all events per product delivered in the order they were generated regardless of stream.

In our case the streamId consists of 'domainName-productId' and we are using the change feed processor to deliver those events to read models and the Process Manager. When we breach 10,000 RU or 50GB on the event store we get physical partition split and therefore multiple change feeds. So our event order is no longer guaranteed cross stream.

Ideally just setting the partition key to productId would solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants