Open
Description
Description
The Message
object returned by DeserializingConsumer.value()
doesn't appear to match the signature- it can return a dict
, for example, and not only a str
or bytes
.
How to reproduce
- Use
AvroDeserializer
to createDeserializingConsumer
- Use
.poll()
method to return message Message.value()
should contain deserialized dictionary instead ofstr
orbytes
I wonder if the DeserializingConsumer needs a DeserializedMessage, with something like the following:
class DeserializedMessage(Message):
def value(self, payload=None) -> dict:
return super().value(payload)
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
):('2.3.0', 33751040), ('2.3.0', 33751295)
- Apache Kafka broker version:
- Client configuration:
{...}
- Operating system:
- Provide client logs (with
'debug': '..'
as necessary) - Provide broker log excerpts
- Critical issue