1. SmartGWT 6.1 power edition - (v11.1p_2017-09-28/PowerEdition Deployment 2017-09-28)
2. Google Chrome Version 62.0.3202.75 (Official Build) (64-bit)
When a message is sent from the server to the client, the message is not always received clientside. It seems that some messages are lost if they were sent during the reset of the connectionTTL.
As we use this messaging tool in a wizard style component in order to show progress and allow next steps, omitting a message is unwanted behaviour.
Could you please fix this problem or provide a workaround?
Test case:
Client code:
Server code:
Logging output:
In order to reproduce this issue more frequently, the messaging.connectionTTL was lowered to 10000ms. Increasing the TTL would make this problem appear less frequently, however this is not a complete solution for us.
2. Google Chrome Version 62.0.3202.75 (Official Build) (64-bit)
When a message is sent from the server to the client, the message is not always received clientside. It seems that some messages are lost if they were sent during the reset of the connectionTTL.
As we use this messaging tool in a wizard style component in order to show progress and allow next steps, omitting a message is unwanted behaviour.
Could you please fix this problem or provide a workaround?
Test case:
Client code:
Code:
package test.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.shared.GWT; import com.smartgwt.client.rpc.Messaging; import com.smartgwt.client.rpc.MessagingCallback; import com.smartgwt.client.widgets.HTMLFlow; /** * Entry point classes define <code>onModuleLoad()</code>. */ public class Test implements EntryPoint { private HTMLFlow flow = new HTMLFlow("lost message test:"); /** * This is the entry point method. */ public void onModuleLoad() { flow.setWidth100(); flow.setHeight100(); CounterWrapper counter = new CounterWrapper(); Messaging.subscribe("lostmessagetest", new MessagingCallback() { @Override public void execute(Object data) { int number = Integer.parseInt(data.toString()); if (number > counter.counter + 1) { flow.setContents(flow.getContents() + "<BR>" + data + " --> SKIPPED A NUMBER!"); GWT.log("Received data: " + number + " --> SKIPPED A NUMBER!"); } else { GWT.log("Received data: " + number); } counter.counter = number; } }); flow.draw(); } private class CounterWrapper { private int counter; } }
Code:
package test.server; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.isomorphic.messaging.ISCMessage; import com.isomorphic.messaging.ISCMessageDispatcher; public class LostMessageTest extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int i = 0; while (true) { try { ISCMessageDispatcher.instance().deliver(new ISCMessage("lostmessagetest", i+"")); i++; Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } } } }
Code:
... ConsoleLogger.java:32 Received data: 133 ConsoleLogger.java:32 Received data: 134 ConsoleLogger.java:32 Received data: 135 ConsoleLogger.java:32 Received data: 136 ConsoleLogger.java:32 Received data: 137 ConsoleLogger.java:32 Received data: 138 ConsoleLogger.java:32 Received data: 139 ConsoleLogger.java:32 Received data: 140 ConsoleLogger.java:32 Received data: 141 EventSource failed loading: GET "http://127.0.0.1:8888/test/sc/messaging?ts=1509964567627&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_15&subscribedChannels=%7B%0A%20%20%20%20lostmessagetest%3A%7B%0A%20%20%20%20%20%20%20%20subscriptionCallback%3Anull%0A%20%20%20%20%7D%0A%7D&eventStream=true". ConsoleLogger.java:32 Received data: 142 ConsoleLogger.java:32 Received data: 143 ConsoleLogger.java:32 Received data: 144 ConsoleLogger.java:32 Received data: 145 ConsoleLogger.java:32 Received data: 146 ConsoleLogger.java:32 Received data: 147 ConsoleLogger.java:32 Received data: 148 ConsoleLogger.java:32 Received data: 149 ConsoleLogger.java:32 Received data: 150 ConsoleLogger.java:32 Received data: 151 EventSource failed loading: GET "http://127.0.0.1:8888/test/sc/messaging?ts=1509964577647&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_16&subscribedChannels=%7B%0A%20%20%20%20lostmessagetest%3A%7B%0A%20%20%20%20%20%20%20%20subscriptionCallback%3Anull%0A%20%20%20%20%7D%0A%7D&eventStream=true". ConsoleLogger.java:32 Received data: 153 --> SKIPPED A NUMBER! ConsoleLogger.java:32 Received data: 154 ConsoleLogger.java:32 Received data: 155 ConsoleLogger.java:32 Received data: 156 ConsoleLogger.java:32 Received data: 157 ConsoleLogger.java:32 Received data: 158 ConsoleLogger.java:32 Received data: 159 ConsoleLogger.java:32 Received data: 160 ConsoleLogger.java:32 Received data: 161 ConsoleLogger.java:32 Received data: 162 EventSource failed loading: GET "http://127.0.0.1:8888/test/sc/messaging?ts=1509964588137&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_17&subscribedChannels=%7B%0A%20%20%20%20lostmessagetest%3A%7B%0A%20%20%20%20%20%20%20%20subscriptionCallback%3Anull%0A%20%20%20%20%7D%0A%7D&eventStream=true". ConsoleLogger.java:32 Received data: 164 --> SKIPPED A NUMBER! ConsoleLogger.java:32 Received data: 165 ConsoleLogger.java:32 Received data: 166 ConsoleLogger.java:32 Received data: 167 ConsoleLogger.java:32 Received data: 168 ConsoleLogger.java:32 Received data: 169 ConsoleLogger.java:32 Received data: 170 ConsoleLogger.java:32 Received data: 171 ConsoleLogger.java:32 Received data: 172 EventSource failed loading: GET "http://127.0.0.1:8888/test/sc/messaging?ts=1509964599175&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_18&subscribedChannels=%7B%0A%20%20%20%20lostmessagetest%3A%7B%0A%20%20%20%20%20%20%20%20subscriptionCallback%3Anull%0A%20%20%20%20%7D%0A%7D&eventStream=true". ConsoleLogger.java:32 Received data: 174 --> SKIPPED A NUMBER! ConsoleLogger.java:32 Received data: 175 ConsoleLogger.java:32 Received data: 176 ConsoleLogger.java:32 Received data: 177 ConsoleLogger.java:32 Received data: 178 ConsoleLogger.java:32 Received data: 179 ConsoleLogger.java:32 Received data: 180 ConsoleLogger.java:32 Received data: 181 ConsoleLogger.java:32 Received data: 182 EventSource failed loading: GET "http://127.0.0.1:8888/test/sc/messaging?ts=1509964609197&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_19&subscribedChannels=%7B%0A%20%20%20%20lostmessagetest%3A%7B%0A%20%20%20%20%20%20%20%20subscriptionCallback%3Anull%0A%20%20%20%20%7D%0A%7D&eventStream=true". ConsoleLogger.java:32 Received data: 183 ConsoleLogger.java:32 Received data: 184 ConsoleLogger.java:32 Received data: 185 ConsoleLogger.java:32 Received data: 186 ConsoleLogger.java:32 Received data: 187 ConsoleLogger.java:32 Received data: 188 ConsoleLogger.java:32 Received data: 189 ConsoleLogger.java:32 Received data: 190 ConsoleLogger.java:32 Received data: 191 ConsoleLogger.java:32 Received data: 192 EventSource failed loading: GET "http://127.0.0.1:8888/test/sc/messaging?ts=1509964619214&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_20&subscribedChannels=%7B%0A%20%20%20%20lostmessagetest%3A%7B%0A%20%20%20%20%20%20%20%20subscriptionCallback%3Anull%0A%20%20%20%20%7D%0A%7D&eventStream=true". ConsoleLogger.java:32 Received data: 193 ConsoleLogger.java:32 Received data: 194 ConsoleLogger.java:32 Received data: 195 ConsoleLogger.java:32 Received data: 196 ConsoleLogger.java:32 Received data: 197 ...
Comment