Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Oct 1, 2024
1 parent 09902e6 commit f5ea8cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pip/pip-379.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The current implementation of Key_Shared subscriptions faces several challenges:

The "Preserving order of processing" section of the Key_Shared documentation would be updated to contain this contract:

In Key_Shared subscriptions, messages with the same key are delivered and allowed to be in unacknowledged state to only one consumer at a time.
_In Key_Shared subscriptions, messages with the same key are delivered and allowed to be in unacknowledged state to only one consumer at a time._

When new consumers join or leave, the consumer handling a message key can change when the default AUTO_SPLIT mode is used, but only after all pending messages for a particular key are acknowledged or the original consumer disconnects.

Expand All @@ -70,7 +70,7 @@ The Key_Shared subscription doesn't prevent using any methods in the consumer AP

Wikipedia tells us about [invariants](https://en.wikipedia.org/wiki/Invariant_(mathematics)#Invariants_in_computer_science): "In computer science, an invariant is a logical assertion that is always held to be true during a certain phase of execution of a computer program."

The contract "In Key_Shared subscriptions, messages with the same key are delivered and allowed to be in an unacknowledged state to only one consumer at a time." can be seen as an invariant for Key_Shared subscriptions. It is something that must always be held true for Key_Shared subscriptions. The design and implementation in PIP-379 focuses on ensuring this.
The contract _"In Key_Shared subscriptions, messages with the same key are delivered and allowed to be in an unacknowledged state to only one consumer at a time."_ can be seen as an invariant for Key_Shared subscriptions. It is something that must always be held true for Key_Shared subscriptions. The design and implementation in PIP-379 focuses on ensuring this.

### Future work in needed for supporting key-based ordering with negative acknowledgements

Expand Down

0 comments on commit f5ea8cc

Please sign in to comment.