BewareMyPower commented on issue #12087: URL: https://github.com/apache/pulsar/issues/12087#issuecomment-923534386
I think our goal is to configure multiple converters and choose the proper one for the message. Since I missed the case in this PIP, I merged them into one. You're right that the `accept` method should be separated. > If we explicitly add a metadata field "messageFormat" to the metadata But existing messages don't have this field, for example, KoP adds the property `entry.format=kafka` to mark messages as Kafka format. I think the detail steps should be: 1. Check the `format` field of metadata 2. If it's set, lookup the converter according to the `format` field 1. fail: report an error to the user and prevent the application to process garbage 2. process the conversion 3. Otherwise, iterate over all converters to find the first converter that accepts the message. 1. If no converter was found, fallback to the default converter that returns the payload simply. 2. Process the conversion. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org