Hi Team,
I'm going to send request for 4000+ items. So divide items for multiple batch request like below, by reference
(_send_market_price_request is called after getting login response correctly.)
class ReutersReceiver:
def _send_market_price_request(self):
# get 4000+ items
all_rics = get_ric_list()
# each batch request has 3500 items
MAX_LIST_LEN = 3500
def get_req_json(rics):
return {
'ID': 2,
'Domain': 'MarketPrice',
'Key': {
'NameType': 'Ric',
'Name': rics,
},
'View':get_view_items_list(),
}
for top_num in range(0, len(all_rics), MAX_LIST_LEN):
_rics = all_rics[top_num:top_num + MAX_LIST_LEN]
self.web_socket_app.send(json.dumps(get_req_json(_rics)))
time.sleep(5)
Only 3447/4678 Refresh message has be returned and as items increase the time first Update message has arrived increase, even though each batch request item size is around 55kb.
Also, the more increasing size, the worse returned Refresh/Update message.
Are there anything bad implementations or other factor?
Or what should I do if there is no simple resolution. Could you give me some workaround?
Thanks
mochizuki.y