-
July 2nd, 2020, 04:03 PM
#9
Hello,
In previously I have subscribed clients with server using the prefix string as Item for every row key
Override public void subscribe(String itemName) throws SubscriptionException, FailureException {
logger.debug("Subscribing to " + itemName);
if (itemName.startsWith("Item")) {
myFeed.sendRates(itemName);
}
}
I have used above method to subscribe clients with server.
In my client I have used like
var liverateId = "Item";
var liverateSubscription = new Subscription("COMMAND",liverateId,fieldList);
liverateSubscription.setDataAdapter("ABQUOTE_ADAPT ER");
liverateSubscription.setRequestedSnapshot("yes");
liverateSubscription.addListener(liverateGrid);
lsClient.subscribe(liverateSubscription);
So it was easy to get subscribe the items from my server. Previously I have created individual adapter so that it was was easy to get connect. Now I have created single adapter for all of my clients.
And my structure looks like now is,
[{"com_id":"33","com_name":"GOLD BAR","selling_rate":"4952","buying_rate":"-","delivery":"30-06-2020","retail_rate":"-","client":"lmxtrade","client_com_id":"lmxtrad e_33 "},{"com_id":"36","com_name":"GOLD FT","selling_rate":"4952","buying_rate":"4751"," de livery":"30-06-2020","retail_rate":"-","client":"lmxtrade","client_com_id":"lmxtrad e_36 "},{\"com_id\":\"36\",\"com_name\":\"GOLD FT\",\"selling_rate\":\"4943\",\"buying_rate\":\" 4 841\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"kkvtrade\",\"client_com_id\":\" kkv trade_36\"},{\"com_id\":\"38\",\"com_name\":\"SILV ER\",\"selling_rate\":\"48455\",\"buying_rate\":\ " 48428\",\"delivery\":\"30-06-2020\",\"retail_rate\":\"-\",\"client\":\"kkvtrade\",\"client_com_id\":\" kkv trade_38\"}]
Here my key is client_com_id field. Now how I need to connect LS server from my client. Can you please help me on this.
Similar Threads
-
By josephpanchal in forum General
Replies: 1
Last Post: October 21st, 2019, 09:35 AM
-
By rvkvino in forum General
Replies: 1
Last Post: February 14th, 2017, 09:22 AM
-
By brunovaghi in forum General
Replies: 1
Last Post: September 30th, 2016, 08:58 AM
-
By Dejan Milosevic in forum Adapter SDKs
Replies: 5
Last Post: July 31st, 2014, 03:06 PM
-
By giangum in forum Client SDKs
Replies: 1
Last Post: September 1st, 2009, 09:20 AM
Tags for this Thread
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 03:06 AM.
Bookmarks