Here is the link to download source code -
Note:
This source code is having few issues which you might need to fix by your own and those are -
- Expose and add connector.stop() under finally block in you java code (to avoid multiple JVM thread issue)
- Increase buffer size under src/main/java/com/salesforce/emp/connector/BayeuxParameters.java class; function name is maxBufferSize() (to ensure listener won’t stop reading the events after certain duration)