eolivelli commented on issue #12087: URL: https://github.com/apache/pulsar/issues/12087#issuecomment-922910119
> if I didn't understand wrong, I think it's a part of converter's implementation. Sorry, I didn't check the implementation (this is expected, because if I take a look to the implementation we could miss some details here in the document). So the example implementation simply skips messages that are not handled by the Converter. I see only one problem with this approach: if the Consumer does not load the Converter the application will receive some corrupted data, because it fails to decode it. If we explicitly add a metadata field "messageFormat" to the metadata, then the PulsarClient can: 1) lookup the Converter, given the format 2a) fail: report an error to the user and prevent the application to process garbage 2b) process the conversion We can do this in two ways: - have a dictionary inside the Pulsar Client that maps the MessageConverted to a format - add a "acceptFormat(String format)" to the MessageConverted interface (and let the Pulsar Client fail the read if no MessageConverted accepted the format) -- 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]
