Skip to content

### Feature Request: Add Support for stop Method in Kafka Consumer #302

@AlbertoGReino-dehn

Description

@AlbertoGReino-dehn

Feature Request: Add Support for stop Method in Kafka Consumer

Description

The stop method is currently not supported in the Confluent Kafka JavaScript client, as noted in the migration guide. The recommended workaround is to disconnect the consumer, but this approach has limitations in scenarios where pausing and resuming consumption is required without fully disconnecting.

Use Case

In our test suite, we need to:

  1. Consume all existing messages from a topic.
  2. Pause the consumer to produce new test messages.
  3. Resume the consumer to consume only the newly produced messages.

Using disconnect as a workaround requires reinitializing the consumer and handling group rebalancing, which is both error-prone and inefficient. Similarly, pause and resume do not allow us to reconfigure the callback logic dynamically, as the run method cannot be called again after the consumer is already running.

Proposed Solution

  • Allows pausing message consumption without fully disconnecting the consumer.
  • Supports re-executing the run method to dynamically adjust the callback logic or reset the consumer's state.

Additional Context

  • Migration Guide
  • Current workaround: Disconnecting and reconnecting the consumer.
  • Using pause and resume, which does not allow re-executing the run method to adjust callback logic dynamically.

Thank you for considering this feature request!

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy