confluentinc / confluent-kafka-python

Confluent's Kafka Python Client
http://docs.confluent.io/current/clients/confluent-kafka-python
Other
56 stars 890 forks source link

A support for 'Protobuf Deserializer' with schema registry #1174

Open dorocoder opened 3 years ago

dorocoder commented 3 years ago

Description

At looking into the source code for Protobuf, it seems like not possible to deserialize a protobuf message without its corresponding static message type argument.

When it comes to Avro, all things needed have been provided and it works well to deserialize an Avro message via schema registry only.

I wonder wether a support for Protobuf deserialization with schema registry is in the middle of being implemented or not planned yet.

class ProtobufDeserializer(object):
    """
    ProtobufDeserializer decodes bytes written in the Schema Registry
    Protobuf format to an object.
    Args:
        message_type (GeneratedProtocolMessageType): Protobuf Message type.
   ...
mhowlett commented 3 years ago

Not planned, haven't investigated. It would require a library that allowed the data to be traversed over dynamically - I'm not sure if this exists in Python or not.

dorocoder commented 3 years ago

Not planned, haven't investigated. It would require a library that allowed the data to be traversed over dynamically - I'm not sure if this exists in Python or not.

Thanks for your quickest and obvious answer.

nilansaha commented 3 years ago

Was gonna post this question as well. @mhowlett is there any equivalent libraries in lets say Java that allows the data to be traversed over dynamically ?

dorocoder commented 3 years ago

Was gonna post this question as well. @mhowlett is there any equivalent libraries in lets say Java that allows the data to be traversed over dynamically ?

I hope you would find some answer at #link