asyncapi / asyncapi/bindings

[FEATURE] Pulsar Order Key

Open
#289 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
79
Forks
81
PR merge metrics
No merged PRs in 30d

Description

### Why do we need this improvement?

Pulsar message order is an important part to consistently understanding a stream of messages. Pulsar guarantees message order for the receiver using a key or partitioning key, when they use a KeyShared subscription.

See
* https://pulsar.apache.org/docs/next/concepts-messaging/#ordering-guarantee
* https://pulsar.apache.org/docs/next/concepts-messaging/#key_shared

### How will this change help?

Documenting the ordering key clarifies both the ordering guarantees (high-level) and the partitioning (technical). Together, this allows providers and consumers to agree on how messages are partially ordered, leading to consistent understanding on both sides.

### Screenshots

_No response_

### How could it be implemented/designed?

I propose adding either `order-key`, `partition-key` or `key` to the [pulsar bindings](https://github.com/asyncapi/bindings/tree/master/pulsar#message-binding-object).
While my employer defines a consistent ordering on channel level, for multiple operations and message types, Pulsar allows defining any value as ordering key on message level.

As such, similar to [Kafka bindings](https://github.com/asyncapi/bindings/tree/master/kafka#message-binding-object), I propose defining a message binding and adding it there.

### 🚧 Breaking changes

No

### 👀 Have you checked for similar open issues?

- [x] I checked and didn't find a similar issue

### 🏢 Have you read the Contributing Guidelines?

- [x] I have read the [Contributing Guidelines](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)

### Are you willing to work on this issue?

Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start with the Pulsar bindings Message Binding Object and compare the Kafka bindings Message Binding Object linked in the issue. Resolve whether the field should be named order-key, partition-key, or key, then add the selected message-level binding and document the ordering and partitioning behavior described by the Pulsar references.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.