Pulsar Java client
You can use a Pulsar Java client to create Pulsar producers, consumers, and readers in Java and perform administrative tasks. All the methods in Java clients are thread-safe. The current Java client version is 3.3.2.
Get started
note
Please refer to Java client Performance considerations for more information on how to improve the performance of the Java client and tune the Java JVM options to avoid java.lang.OutOfMemoryError: Direct buffer memory
errors in high-throughput applications.
What’s next?
- Work with clients
- Work with producers
- Work with consumers
- Work with readers
- Work with TableView
- Configure cluster-level failover
Reference doc
API reference
The following table outlines the API packages and reference docs for Pulsar Java clients.
Package | Description | Maven Artifact |
---|---|---|
org.apache.pulsar.client.api | Java client API. See Client API overview for more reference. | org.apache.pulsar:pulsar-client:3.3.2 |
org.apache.pulsar.client.admin | Java admin API. See Admin API overview for more reference. | org.apache.pulsar:pulsar-client-admin:3.3.2 |
org.apache.pulsar.client.all | Include both pulsar-client and pulsar-client-admin .Both pulsar-client and pulsar-client-admin are independently shaded packages. Consequently, the applications using both pulsar-client and pulsar-client-admin have redundant shaded classes. It would be troublesome if you introduce new dependencies but forget to update shading rules.In this case, you can use pulsar-client-all , which shades dependencies only one time and reduces the size of dependencies. | org.apache.pulsar:pulsar-client-all:3.3.2 |