Hello!

When implementing the ConsumerGroupHeartbeat API for the TchKafka project,
I faced problems deserializing the Assignment property of the Response. The
documentation states that it should be "null if not provided; the
assignment otherwise." However, in protocol primitive types, there is no
such thing as Null itself, so I assumed that's part of CompactArray, as for
the topic_partitions property of the Request or any other property in the
protocol. Unfortunately, it was not the case, and Null for the assignment
property is encoded as one byte smaller than 0. If it's not null, it's
still a CompactArray (which is capable of encoding nulls by itself, by the
way). Is this Null encoding an established protocol primitive type? If so,
can we add this to the docs? What's the purpose of encoding the null
outside of CompactArray?

BR,
Michał Kalinowski

Reply via email to