Skip to content

Allow independently setting the partition key for Cosmos #69

@Darren166

Description

@Darren166

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions