lhotari commented on issue #11819: URL: https://github.com/apache/pulsar/issues/11819#issuecomment-2898004855
> This is not a pretty suggestion for a solution, but `org.apache.pulsar.client.impl.schema.writer.AvroWriter.write` could check with Java reflection if the `message` object class extends non-shaded `SpecificRecordBase` (or any other Avro) class. If so, then it could assume that Avro libraries are on the classpath and try to invoke non-shaded `org.apache.avro.reflect.ReflectDatumWriter` via reflection instead. If it fails because regular Avro is not on the classpath, then it could fall back to the shaded branch. > > It would likely need some resolution caching for performance reasons. This could be a solution if there's no way to use the unshaded client. One of the future changes would be to exclude Avro from shading in the shaded client. This is the approach that was taken for Protobuf library in https://github.com/apache/pulsar/pull/23468 . -- 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]
