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.
Observed behavior:
When a
BaseConsumer, configured withenable.partition.eof = trueand a customClientContextreaches the end of a partition, theerrormethod on the context is invoked with aKafkaError::Globalerror wrapping theRDKafkaErrorCode::PartitionEOFerror code.It's probably because the
handle_error_eventinClientalways constructs the Global variant before passing it to the context, while thehandle_error_eventinBaseConsumerchecks the code and constructs aKafkaError::PartitionEOFwhen appropriate.Expected behavior:
The
ClientContextimplementation oferrorreceives theKafkaError::PartitionEOFerror variant when the partition eof is reached.