i am running into an issue using the NonVisualTable of the web client api. occasionally, the table never receives any bootstrap or update messages. here is the code that i am using to create the table:
Code:
var lsPage = new PushPage();
var pushHost = null;
lsPage.context.setDomain(domainName);
lsPage.context.setDebugAlertsOnClientError(false);
lsPage.context.setRemoteAlertsOnClientError(true);
lsPage.onEngineCreation = function(lsEngine) {
lightStreamerEngine = lsEngine;
lsEngine.context.setDebugAlertsOnClientError(false);
lsEngine.context.setRemoteAlertsOnClientError(true);
lsEngine.connection.setLSHost(pushHost);
lsEngine.connection.setLSPort(webServerPort);
lsEngine.connection.setAdapterName(adapterName);
lsEngine.policy.setMaxBandwidth('UNLIMITED');
lsEngine.policy.setIdleTimeout(30000);
lsEngine.policy.setPollingInterval(1000);
lsEngine.changeStatus("STREAMING");
}
lsPage.bind();
lsPage.createEngine("SLEngine","ls/","SHARE_SESSION");
function addNonVisualTable(tableName, tGroup, tSchema, updateFunction) {
try {
var newTable = new NonVisualTable(tGroup, tSchema, "MERGE");
newTable.setSnapshotRequired(true);
newTable.onItemUpdate = updateFunction;
if (tableName == 'interestRateTable') {
newTable.onStart = function() {
alert('interestRateTable successfully subscribed');
};
}
lsPage.addTable(newTable, tableName);
}
catch(e) {
processException('error adding non vis push table', e);
}
}
in the instances where no messages are received, the onStart function is never called. i am not too familiar with the server logs of lightstreamer, but i can see updates in the server logs for the tableName.
this problem usually occurs when i create a number of subscriptions in rapid succession.
any help would be greatly appreciated
version info: server=3.4.5 build 1376; client=4.2
Bookmarks