-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-shaded protobuf-java causing class mismatch issues #876
Comments
Hello @onobc |
If one were to pull |
Hi @onobc |
Looks like this may get fixed in Pulsar proper as well: apache/pulsar#23468 |
Hehe, it is happening :D What a coincidence. |
This commit excludes the `protobuf-java` unshaded transitive dependency from the `pulsar-client-all` library. This allows the version of the optional `protobuf-java` dependency to be controlled by `spring-pulsar`. Resolves spring-projects#876
The Pulsar client lib does not shade
com.google.protobuf:protobuf-java
and it is causing user's problems as described in original post by @nandorholozsnyak in #114 (comment)_Workaround 1
Upgrade to Pulsar client
3.3.2
as heprotobuf-java
has been updated to3.25.5
.If you plan on updating to the upcoming spring-pulsar
1.2.0-RC1
release (Spring Boot3.4.0-RC1
/ week of Oct 18) you will get this update automatically.If you don't plan on updating Spring Pulsar then, you can override the version of Pulsar as described here.
This will bring the
protobuf-java
up to a recent version, solving the original author's issue, but will not fix future version mismatches.Workaround 2
You can exclude
protobuf-java
from the currentpulsar-client-all
and provide the more recent dependency (example here.Something like:
Improvement 1
We already exclude some other unwanted dependencies from the Pulsar lib (here.
We should likely exclude
protobuf-java
as well as we do include it explicitly already as optional dependency (here.We will try to get the above improvement into the upcoming
1.2.0-RC1
release as well.Improvement 2
We should also see about shading the protobuf-java lib in the Pulsar client libs to avoid this downstream required massaging.
The text was updated successfully, but these errors were encountered: