Newer Version Available
Example: Subscribe to Events Using a Java Client (EMP Connector) and an IDE
The Java sample shows you how to use an open-source library called Enterprise Messaging
Platform (EMP) Connector in the Eclipse IDE. EMP Connector is a thin wrapper around the CometD
library. It hides the complexity of creating a CometD client and subscribing to Streaming API in
Java. The example subscribes to a platform event, receives notifications, and supports replaying
events with durable streaming.
EMP Connector is based on Java and uses CometD version 3.1.0. It supports username and password authentication and OAuth bearer token authentication. This walkthrough shows steps only for username and password authentication.