彭博API请求超时 [英] Bloomberg API request timing out

查看:383
本文介绍了彭博API请求超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经成立了一个ReferenceDataRequest我送它一起到的EventQueue

Having set up a ReferenceDataRequest I send it along to an EventQueue

Service refdata = _session.GetService("//blp/refdata");
Request request = refdata.CreateRequest("ReferenceDataRequest");
// append the appropriate symbol and field data to the request
EventQueue eventQueue = new EventQueue();
Guid guid = Guid.NewGuid();
CorrelationID id = new CorrelationID(guid);
_session.SendRequest(request, eventQueue, id);
long _eventWaitTimeout = 60000;
myEvent = eventQueue.NextEvent(_eventWaitTimeout);



通常我可以抓住从队列中的消息,但我现在打的情况,如果我M使得一些在应用程序(通常约十),我看到一个 TIMEOUT 事件类型

if (myEvent.Type == Event.EventType.TIMEOUT)
    throw new Exception("Timed Out - need to rethink this strategy");
else
    msg = myEvent.GetMessages().First();



这些被同一线程上进行,但我假设有某处沿线的东西说我消费,而不是释放。

These are being made on the same thread, but I'm assuming that there's something somewhere along the line that I'm consuming and not releasing.

任何人有任何线索或建议?

Anyone have any clues or advice?

有对SO以BLP的API没有太多的参考,但希望我们可以开始扭转这种局面。

There aren't many references on SO to BLP's API, but hopefully we can start to rectify that situation.

推荐答案

我并没有真正得到过围绕解决这个问题,但我们没有找到一个解决办法。基于服务器的API文档中的一个小的,显然是暴殄天物,评论

I didn't really ever get around to solving this question, but we did find a workaround.

,我们选择以创建第二次会议。一个会话负责静态请求,其他为实时。例如

Based on a small, apparently throwaway, comment in the Server API documentation, we opted to create a second session. One session is responsible for static requests, the other for real-time. e.g.

_marketDataSession.OpenService("//blp/mktdata"); 
_staticSession.OpenService("//blp/refdata");

的手段之一届订阅模式下,其他多个同步 - 我认为这是这个偶这在我们问题的根源。

The means one session operates in subscription mode, the other more synchronously - I think it was this duality which was at the root of our problems.

既然做出这样的转变,我们已经没有任何问题。

Since making that change, we've not had any problems.

这篇关于彭博API请求超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆