dlg99 commented on PR #23172: URL: https://github.com/apache/pulsar/pull/23172#issuecomment-2291480671
> > DLQ producer implicitly converts byte[] key into a bas64-encoded string representing that byte array. > > @dlg99 I guess the key bytes itself doesn't change, but the encoding changes? What type of problems has this caused? Correct, the hasBase64EncodedKey state is lost thus the key is not decoded into bytes. It caused problems with KeyValue<AVRO, AVRO, SEPARATED> data sent to DLQ - data from the DLQ cannot be read (avro exception, wrong format) with expected schema; it can be read only using KeyValue<BYTES, AVRO, SEPARATED> and manually decoding and parsing the key. This happens because it goes through getKeyBytes() which relies on `hasBase64EncodedKey()` status to decide whether to to do the base64 decoding https://github.com/apache/pulsar/blob/15b88d250818bada5c1a94f5c54ef7806f88a500/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageImpl.java#L628-L636 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
