Java Client

The sample Java client uses Pub/Sub API to publish and subscribe to platform events. Pub/Sub API provides a single interface to publish and subscribe to event messages. Based on gRPC and HTTP/2, Pub/Sub API enables efficient delivery of binary event messages in the Apache Avro format.

The sample Java client provides enough instructions and code snippets so that you can build your own client. The examples in the Java client are for learning purposes only. The examples aren’t intended for production use and haven’t undergone thorough functional and performance testing. You can use these examples as a starting point to build your own client.

Important

Check out Java Quick Start for Publishing and Subscribing to Events in the Pub/Sub API Developer Guide.