Open mat8913 opened 3 years ago
you'd need to pass the bytes, not the deserialized key because the serialization context is also passed when deserializing the key and also, it's not a generic type, which it ideally would be. and if you're passing the key, probably also pass the value for completeness (though i expect that wouldn't be used).
if there's no alternative to satisfying an important use-case i'd probably be happy to, but i'm not convinced.
I've found a good workaround for my use case: I just use IConsumer<byte[], byte[]>
and then do the actual deserialization in my own code.
I've found a good workaround for my use case: I just use
IConsumer<byte[], byte[]>
and then do the actual deserialization in my own code.
Hi @mat8913 did you look at KafkaFlow framework? There the Serialization is made by a middleware, so you can create your own serialization middleware or use one provided by the framework with a custom Type Resolver. Look here: https://github.com/farfetch/kafka-flow
I have an application which needs to look at the key first before deserializing the rest of the message. Would you be opposed to a PR adding the key to
SerializationContext
?