parallel-consumer icon indicating copy to clipboard operation
parallel-consumer copied to clipboard

Offset reset when frequent rebalancing

Open sangreal opened this issue 1 year ago • 6 comments

How this happens:

  1. traffic is low / unbalanced
  2. no new offset in this partition
  3. frequent rebalancing

sangreal avatar Oct 20 '25 08:10 sangreal

Carried via #893, which is approved here but unmerged, in astubbs/parallel-consumer#57.

Tracked in the maintained fork as astubbs/parallel-consumer#121.

The Confluent-hosted version of this project is no longer maintained - its README says so. Parallel Consumer itself continues in my fork: https://github.com/astubbs/parallel-consumer

Nothing in this repository is closed or changed by this comment.

astubbs avatar Aug 04 '26 23:08 astubbs

The batch-failure behavior itself belongs in Parallel Consumer.

What's relevant to us is the recovery step after the bad record is isolated/fixed: operators should be able to select and replay only the affected records rather than broadly rewinding the consumer and duplicating healthy work.

That selective, validated recovery workflow is what ReplayGuard focuses on.

How are you handling recovery from this batch failure today?

https://replayguard.in/

ravithejatech714-create avatar Aug 29 '26 14:08 ravithejatech714-create

Batch failure and dlq are quite different parts. Batch failure is already handled in PC’s batching system and Dlq is planned in my fork and will have single record interactive replay options and other techniques for poison pills etc.

This #894 was fixed in https://github.com/astubbs/parallel-consumer/pull/57 and a few other places.

astubbs avatar Aug 31 '26 08:08 astubbs

Thanks Antony — that's a useful distinction. I was conflating batch-failure handling with the later DLQ/recovery workflow.

The planned single-record interactive replay is particularly interesting. Do you see that capability living primarily inside Parallel Consumer because it needs consumer-specific state/semantics, or could the replay trigger itself reasonably sit in an external recovery layer while PC continues to own processing semantics?

That boundary is exactly what we're trying to understand.

ravithejatech714-create avatar Sep 01 '26 03:09 ravithejatech714-create

@sangreal - this is now fixed and released in the maintained fork, in v0.6.0.0: astubbs/parallel-consumer#337 carries confluentinc/parallel-consumer#893 (credit unchanged - @sangreal's fix, approved here by @rkolesnev in November 2025) together with the deterministic reproduction that was asked for on that PR in October 2025 and, until now, did not exist anywhere. The coordinates changed with the fork - on Maven Central it is now:

<dependency>
    <groupId>bz.stub.parallelconsumer</groupId>
    <artifactId>parallel-consumer-core</artifactId>
    <version>0.6.0.0</version>
</dependency>

(parallel-consumer-vertx, parallel-consumer-reactor and parallel-consumer-mutiny likewise.) The Java package is bz.stub.parallelconsumer too, so imports change with it - one command rewrites them (GNU sed; on macOS use sed -i ''):

find . -name '*.java' -exec sed -i 's/io\.confluent\.parallelconsumer/bz.stub.parallelconsumer/g' {} +

For anyone landing here later: the flow PDF attached to confluentinc/parallel-consumer#893 turned out to contain both the production logs and a working "how to make it happen" recipe - it was the key to the reproduction. The full account is on the fork's mirror, astubbs/parallel-consumer#121.

astubbs avatar Sep 17 '26 03:09 astubbs

The planned single-record interactive replay is particularly interesting. Do you see that capability living primarily inside Parallel Consumer because it needs consumer-specific state/semantics, or could the replay trigger itself reasonably sit in an external recovery layer while PC continues to own processing semantics?

That boundary is exactly what we're trying to understand.

Oh yes, inside PC definitely.

astubbs avatar Sep 30 '26 03:09 astubbs