Skip to content

Parallel consumer doesn't process any more records due to incorrect management of work #547

Closed

Description

Parallel Consumer threads pauses polling messages from topic/partitions(s) and hence doesn't invoke user function, due to the "leak" in the counter of non-existent work when partition state changes. (Rebalancing, offline etc).

Confluent library version: 0.5.2.4

Possible (Observed) root cause -
The problem appears to be stemming from not cleaning up the variable WorkManager.java#numberRecordsOutForProcessing, when the partition is revoked (partition epoch changes). The effect is gradual, until the numberOfRecordsOutForProcessing hits the Max value formulated via ParallelConsumerOptions.

Due to the above, the consumer stops polling/processing messages which causes consumer lag to build up.

Temporary Work Around: Restarting the process.

PC-Options

thread_stack_pc.txt

Activity

  1. added a commit that references this issue on Feb 14, 2023
    d58ea70
  2. changed the title [-]Parallel consumer doesn't process more records due to incorrect management of work[/-] [+]Parallel consumer doesn't process any more records due to incorrect management of work[/+] on Feb 14, 2023
  3. RaviKalasapur commented on Feb 14, 2023

    @RaviKalasapur
    ContributorAuthor

    My honest attempt to add a test case which fails and a possible fix too. :)

  4. bscully-ot commented on Feb 14, 2023

    @bscully-ot
  5. added 5 commits that reference this issue on Feb 16, 2023
    626845a
    7e56dcb
    35bee28
    894c5d5
    bafb2bd
  6. added 2 commits that reference this issue on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions