-
September 19th, 2014, 03:17 PM
#1
DISTINCT and RAW
Hi
I have a simple test HTML client that is trying to subscribing to java Adapter in DISTINCT or RAW mode. Looks like the client is connected but does not subscribe. The same client works well if i subscribe in MERGE mode.
I am aware that the MERGE and DISTINCT mode clients can not co-exist, so after my MERGE test i restarted my adapter to make sure i don't have any client connected to it in MERGE mode.
The first line on my java adapter subscribe method is printing out the item that is being subscribed. When subscribe in MERGE mode, i see the line being printed , but on the DISTINCT or RAW mode, i don't see it which makes me believe that i am not subscribed.
Question is do i need to make any special setting in the Adapter to support DISTINCT or RAW ? i am not sure what i am missing.
Below is the snippet of client code , Please advise
<script>
var hostToUse = "http://localhost:9090"
define("lsClient",["LightstreamerClient","StatusWidget"],function(LightstreamerClient,StatusWidget) {
var lsClient = new LightstreamerClient(hostToUse,"ESTREAMER");
lsClient.connect();
return lsClient;
});
</script>
<!-- JavaScript code specific of this application -->
<script type="text/javascript">
require(["lsClient","Subscription","DynaGrid"], function(lsClient,Subscription,DynaGrid) {
var logDynaGrid = new DynaGrid("loggrid",true);
logDynaGrid .setAutoCleanBehavior(true,false);
logDynaGrid .addListener({
onVisualUpdate: function(key,info, domNode) {
if (info == null) {
//cleaning
return;
}
var cold = (key.substring(4) % 2 == 1) ? "#eeeeee" : "#ddddee";
info.setAttribute("yellow", cold, "backgroundColor");
}
});
var logGridSubscription = new Subscription("RAW","item_1",logDynaGrid .extractFieldList());
logGridSubscription.addListener(logDynaGrid);
logGridSubscription.setDataAdapter("LOG_ADAPTER_DI S");
logGridSubscription.setRequestedSnapshot("yes");
lsClient.subscribe(logGridSubscription);
});
</script>
-
September 19th, 2014, 06:34 PM
#2
This is resolved, had to fix metadata_provider definition
Similar Threads
-
By Dejan Milosevic in forum General
Replies: 1
Last Post: June 9th, 2014, 10:07 AM
-
By Alessandro in forum General
Replies: 3
Last Post: July 22nd, 2013, 09:54 AM
-
By hungtt in forum General
Replies: 1
Last Post: January 4th, 2011, 12:07 PM
-
By Isanderthul in forum Adapter SDKs
Replies: 5
Last Post: July 30th, 2009, 11:34 AM
-
By rsouissi in forum Adapter SDKs
Replies: 6
Last Post: May 30th, 2007, 11:47 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:17 PM.
Bookmarks