Skip to content

Commit 0b2c226

Browse files
committed
Clarify how deduplication works for super-stream producers
References #986
1 parent 1026387 commit 0b2c226

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/docs/asciidoc/super-streams.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,16 @@ include::{test-examples}/SuperStreamUsage.java[tag=producer-custom-routing-strat
219219
Deduplication for a super stream producer works the same way as with a <<api.adoc#outbound-message-deduplication, single stream producer>>.
220220
The publishing ID values are spread across the streams, but this does not affect the mechanism.
221221

222+
For a named super stream producer, publishing IDs are interpreted as a single sequence shared across all partitions of the super stream.
223+
224+
Because partitions can advance at different rates, `Producer#getLastPublishingId()` for a super stream returns the smallest last publishing ID observed across its partitions.
225+
This is intentional: after a restart, resuming from `getLastPublishingId() + 1` is expected to replay the same logical message sequence with the same routing strategy.
226+
Partitions that already stored some of these publishing IDs will filter them out through deduplication.
227+
228+
In other words, this mechanism is designed for replaying the same sequence after restart, not for treating each partition as having an independent resume cursor.
229+
230+
If an application needs partition-specific resume positions, it must track them separately at the application level.
231+
222232
==== Consuming From a Super Stream
223233

224234
A super stream consumer is a composite consumer: it looks up the super stream partitions and creates a consumer for each of them.

0 commit comments

Comments
 (0)