Step 1: Define a Platform Event
Step 2: Build the Client
Step 3: Configure Client Parameters
Step 4: Publish and Subscribe to Platform Events
Step 5: Subscribe to Change Events
Code Examples
Fork and clone the client from GitHub, and then build the client.
Prerequisites
pub-sub-api GitHub repository: https://github.com/forcedotcom/pub-sub-api. For more information, see Fork a repository in GitHub Docs. Forking a repository enables you to save your changes in your forked repository. If you want to skip forking the repo, you can just clone the repo, but you can’t save changes that you make in the pub-sub-api repo.java folder in your cloned pub-sub-api folder.java folder, enter: mvn clean install