What would be the current examples of using the Ja...
# general
g
What would be the current examples of using the Java Admin API https://pulsar.apache.org/docs/3.2.x/admin-api-get-started/ ? In the docs the examples seem to be outdated (version 2.11, while the current Pulsar version is 3.2.x).
l
There aren't relevant changes in the API. Just set the version number to 3.2.2 to get 3.2.x Admin API dependency.
g
I have done that, but I get an error:
Copy code
error: object PulsarAdmin is not a member of package org.apache.pulsar.client.admin
import org.apache.pulsar.client.admin.PulsarAdmin
       ^
I have added the
org.apache.pulsar:pulsar-client-admin:3.2.2
dependency
The solution is that I need to add also the
org.apache.pulsar:pulsar-client-admin-api
dependency.
l
ok. that seems to be a bug. A similar issue was fixed for pulsar-client in https://github.com/apache/pulsar/pull/10614 . Would you mind reporting an issue?
g
I'm not sure it's a bug.
pulsar-client-admin
seems to depend on
pulsar-client-admin-api
. I just did not notice that right away. I'm using Bazel, so transitive dependencies are not immediately visible in compile scope, I need to include them explicitly.
👍 1
l
btw. if you happen to be using both
pulsar-client
and
pulsar-client-admin
dependencies, it's better to use
pulsar-client-all
which includes both clients. The difference is that shaded dependencies are shared instead of duplicated.
👍 1