The Pub/Sub server
Once the WebSocket output is enabled and the application is running, you will see connect exceptions trying to reach the Pub/Sub server (java.net.ConnectException: Connection refused: localhost/127.0.0.1:8890
). To launch the server, open a new terminal window and run the following commands to fetch the source code and run the server:
git clone https://github.com/atrato/pubsub-server.git
cd pubsub-server
mvn compile exec:java
The console will show in the first log lines the listening address of the server:
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ atrato-pubsub-server --- 2017-06-16 14:18:29,408 [io.atrato.pubsubserver.PubsubServer.main()] INFO util.log initialized - Logging initialized @4190ms 2017-06-16 14:18:29,487 [io.atrato.pubsubserver.PubsubServer.main()] INFO server.Server doStart - jetty-9.1.6.v20160112 2017-06-16 14:18:30,055 [io.atrato.pubsubserver.PubsubServer.main()] INFO handler.ContextHandler doStart - Started o.e.j.s.ServletContextHandler...