api-guidelines icon indicating copy to clipboard operation
api-guidelines copied to clipboard

[new rule] must use `partitionkey` context attribute (CloudEvents)

Open BirgitBader opened this issue 2 years ago • 1 comments

(i) This issue has been manually transferred from a former internal repository, as a private repository issue cannot be transferred to a public repository.

Context

Many transport use partitioning as a way to perform scaling (see https://www.instaclustr.com/blog/the-power-of-kafka-partitions-how-to-get-the-most-out-of-your-kafka-cluster/).

As a CloudEvent may be passed between multiple intermediaries before being consumed, the intermediaries need to have a way to partition event streams to scale efficiently.

The partition extension provides a common way to provide a context attribute containing the partition key.

A typical partitionkey for events originating from one source is the source-id. Depending on the business case, the partitionkey may also be something else.

BirgitBader avatar May 16 '23 06:05 BirgitBader

Comment history

Apr 20, 2022 by @thake

On second thought using this extension should not be part of the MVP. The MVP concentrates on the usage of kafka as a transport. Kafka records inherently have a partitionkey, therefore this rule is not needed in the MVP.

BirgitBader avatar May 16 '23 07:05 BirgitBader