In this latest release full failover and reconnection support has been added. Using the new connect method, its now possible to configure 100% of the failover and reconnection options available in StreamHub. For example:
StreamHubGWTAdapter streamhub = new StreamHubGWTAdapter();
List servers = new ArrayList();
servers.add("https://push1.stream-hub.com/");
servers.add("https://push2.stream-hub.com/");
servers.add("https://push3.stream-hub.com/");
FailoverParameters failoverParameters = new FailoverParameters(servers);
failoverParameters.setAlgorithm(FailoverAlgorithm.PRIORITY);
failoverParameters.setInitialReconnectDelayMillis(2000);
failoverParameters.setMaxReconnectDelayMillis(30000);
failoverParameters.setUseExponentialBackOff(true);
failoverParameters.setBackOffMultiplier(2.0);
failoverParameters.setMaxReconnectAttempts(20);
streamhub.connect(failoverParameters);
For full details of the API, you can browse the Javadoc online or checkout the projects homepage on Google Code.
The method "streamhub.connect(failoverParameters)" doesn´t exist in version 1.0.2.Can you update this documentation? Thanks.
ReplyDeleteHi, the failover connect method was introduced from 1.0.3 onwards. Suggest you download the latest version which is 1.0.4. Available here:
ReplyDeletehttp://gwt-comet-streamhub.googlecode.com/files/streamhub-gwt-adapter-1.0.4.jar
Documentation:
http://www.stream-hub.com/doc/streamhub-gwt-adapter/1.0.4/javadoc/