Skip to content

Conversation

@mgravell
Copy link
Collaborator

@mgravell mgravell commented Feb 6, 2026

IDMP is a new server 8.6 feature that allows at-most-once stream additions, via a small tweak to XADD

  • mode 1: XADD ... IDMPAUTO pid * {fields}
  • mode 2: XADD ... IDMP pid iid * {fields}

A pid is a producer identifier - "who sent this?"; the optional iid identifies the individual element, think "source correlation id" - if omitted, it is auto-generated from the payload. Ultimately, if you XADD the same pid/iid combination in IDMP mode, it does not add duplicates; instead, you get back the message-id from the last time you added it.

The tests are guarded to 8.6 which means they don't run on the current CI, since no CI image is yet available. Everything looks fine locally.

  • support XADD IDMP
  • support new XINFO fields
  • support XCFGSET
  • fix test delta in XTRIM in 8.6

Design choices:

  • iid/pid for XADD are represented by a new readonly struct StreamIdempotentId which replaces the usual RedisValue? messageId, since IDMP is only permitted with * as the message-id; this makes the API additions unambiguous, in particular because there are no conversion operations (contrast RedisValue).
  • the configuration settings for XCFGSET are represented by a new class StreamConfiguration, since it is a variadic settings API, and we don't know how many additional options may be added in the future

- XINFO new fields
- fix delta in XTRIM in 8.6
Copy link
Collaborator

@philon-msft philon-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add docs for this?

@mgravell
Copy link
Collaborator Author

mgravell commented Feb 6, 2026

I should, yes.

@mgravell mgravell merged commit 18fdcd7 into main Feb 9, 2026
4 checks passed
@mgravell mgravell deleted the marc/idempotent-producers branch February 9, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants