Skip to content

ClientContext::error is called with KafkaError::Global and not KafkaError::PartitionEOF when reaching the EOF on a partition #820

Description

@rutgerclaes

Observed behavior:

When a BaseConsumer, configured with enable.partition.eof = true and a custom ClientContext reaches the end of a partition, the error method on the context is invoked with a KafkaError::Global error wrapping the RDKafkaErrorCode::PartitionEOF error code.

It's probably because the handle_error_event in Client always constructs the Global variant before passing it to the context, while the handle_error_event in BaseConsumer checks the code and constructs a KafkaError::PartitionEOF when appropriate.

Expected behavior:

The ClientContext implementation of error receives the KafkaError::PartitionEOF error variant when the partition eof is reached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions