简体   繁体   English

如何将FIX消息存储到数据库中

[英]how to store the FIX message into the database

I want to know that how to store the FIX message into the database to keep the log of the transferring message. 我想知道如何将FIX消息存储到数据库中,以保留传输消息的日志。 Is it to store whole message into the single column of the table or store the whole message in the Tag value format ie column names should be tag names or tag values and actual transferring message values in the row. 是将整个消息存储到表的单个列中还是以标记值格式存储整个消息,即列名应为标记名或标记值以及行中实际传输的消息值。 can anyone give me suggestion on it. 谁能给我建议。 Thanks in advance. 提前致谢。

This is not a built-in feature of QuickFIX. 这不是QuickFIX的内置功能。 Even when you configure QuickFIX to use a DB for the message store, it is not meant for application-level access. 即使将QuickFIX配置为将DB用于消息存储,也不能用于应用程序级访问。 That is, it is not intended that you are to be able to access or manipulate it, and QF does not give you methods to do so. 也就是说,这并不意味着您将能够访问或操作它,并且QF并没有为您提供这样做的方法。

That said, implementing DB storage at the application level is not very difficult, and the questions you're asking are dependent on your needs and preferences. 也就是说,在应用程序级别实现数据库存储不是很困难,并且您要问的问题取决于您的需求和偏好。 There isn't really a general correct answer. 确实没有一个普遍正确的答案。

One tip, though, is to not do the DB-save in the QuickFIX callbacks themselves. 但是,一个技巧是不要在QuickFIX回调自身中进行数据库保存。 You should probably do that work off of the QF thread. 你或许应该做的工作, 关闭 QF线程。 Instead, I think those callbacks to save those messages into a separate queue, and a different thread should be responsible for operating on that queue and saving those messages into the DB. 相反,我认为这些回调将这些消息保存到一个单独的队列中,并且应该由另一个线程负责对该队列进行操作并将这些消息保存到DB中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM