Hey there folks! My team is working on migrating application code that handles wire formatting of messages: serialization, deserialization, encryption, and signature. We are moving to custom Ser/Des classes implementing this interface https://kafka.apache.org/24/javadoc/org/apache/kafka/common/serialization/Deserializer.html. These features used to live in a library and we figure that using the class implementations would give us more flexibility while keeping a canonical implementation of what SerDes looks like in our organization.
Given that context, if there are any errors while processing the message on the consumer, how can I access the original bytes of the message? We need to access the original bytes because we would like to publish the original message that was encrypted and signed to a deadletter topic to be processed later on. Currently, the approach we considered viable, but an ugly workaround, is to set a header during the deserializing with the original bytes. Are there other options? Thanks, Michel Dib -- Confidentiality note: This e-mail may contain confidential information from Nu Holdings Ltd and/or its affiliates. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone; for details about what personal information we collect and why, please refer to our privacy policy <https://api.mziq.com/mzfilemanager/v2/d/59a081d2-0d63-4bb5-b786-4c07ae26bc74/6f4939b9-5f74-a528-1835-596b481dca54>.