[英]quickfix C+ Incorrect BeginString with FIXT.1.1 and FIX.5.0 - FIX.5.0SP2
I'm creating an initiator and acceptor which speak FIX.5.0SP2.我正在创建一个使用 FIX.5.0SP2 的发起者和接受者。 I'm getting an
"58":"Incorrect BeginString"
error on logon, on the acceptor (and on fromAdmin on the initiator).我在登录、接受者(以及发起者的 fromAdmin)上收到
"58":"Incorrect BeginString"
错误。 I believe my configs are correct:我相信我的配置是正确的:
initiator:发起人:
# default settings for sessions [DEFAULT] ConnectionType=initiator ReconnectInterval=60 UseLocalTime=Y PersistMessages=Y FileStorePath=./data FileLogPath=./log HttpAcceptPort=9016 SenderCompID=X BeginString=FIXT.1.1 TransportDataDictionary=./support/FIXT11.xml [SESSION] TargetCompID=Y StartTime=00:00:00 EndTime=23:59:59 HeartBtInt=30 SocketConnectPort=8599 SocketConnectHost=localhost DefaultApplVerID=FIX.5.0SP2 AppDataDictionary=./support/FIX50SP2.xml
acceptor:受体:
# default settings for sessions [DEFAULT] ConnectionType=acceptor ReconnectInterval=60 UseLocalTime=Y PersistMessages=Y PostgreSQLStoreDatabase=quickfix PostgreSQLStoreUser=xx PostgreSQLStoreHost=localhost PostgreSQLStorePort=5432 PostgreSQLStoreUseConnectionPool=Y PostgreSQLLogDatabase=quickfix PostgreSQLLogUser=electronifie PostgreSQLLogHost=localhost PostgreSQLLogPort=5432 PostgreSQLLogUseConnectionPool=Y FileStorePath=./data FileLogPath=./log HttpAcceptPort=9212 SenderCompID=Y BeginString=FIXT.1.1 TransportDataDictionary=./support/FIXT11.xml [SESSION] TargetCompID=X StartTime=00:00:00 EndTime=23:59:59 HeartBtInt=30 SocketAcceptPort=8599 DefaultApplVerID=FIX.5.0SP2 AppDataDictionary=./support/FIX50SP2.xml
I've tried all sorts of permutations and none seem to work.我尝试了各种排列,但似乎都不起作用。
Is there an error in the BeginString logic? BeginString 逻辑中是否有错误?
Thanks,谢谢,
Matt马特
EDIT: adding logs:编辑:添加日志:
acceptor event log: http://gist.github.com/mateodelnorte/167a83990801d7bb506e acceptor message log: http://gist.github.com/mateodelnorte/6d1f400a4e61875afee9 initiator event log: http://gist.github.com/mateodelnorte/a376c6cc0eb0f71bd222 initiator message log: http://gist.github.com/mateodelnorte/5c1b0c4ca2dda3e93b29
Check your dictionary, it should say something like检查你的字典,它应该说
<fix type='FIXT' major='1' minor='1' servicepack='0'>
If the dictionary on the acceptor receives a version that isn't in the dictionary it will return that error.如果接受器上的字典收到字典中没有的版本,它将返回该错误。
请你可以尝试如下 [SESSION] BeginString=FIXT.1.1 BeginString=FIX.VERSION
The DefaultMessageFactory try to load versioned messages' dlls (QuickFIXn.FIX*.dll) and find a factory implementation for each version: DefaultMessageFactory 尝试加载版本化消息的 dll (QuickFIXn.FIX*.dll) 并找到每个版本的工厂实现:
/// <summary>
/// This constructor will
/// 1. Dynamically load all QuickFix.*.dll assemblies into the current appdomain
/// 2. Find all IMessageFactory implementations in these assemblies (must have parameterless constructor)
/// 3. Use them based on begin strings they support
/// </summary>
/// <param name="defaultApplVerId">ApplVerID value used by default in Create methods that don't explicitly specify it (only relevant for FIX5+)</param>
public DefaultMessageFactory(string defaultApplVerId = QuickFix.FixValues.ApplVerID.FIX50SP2)
{
_defaultApplVerId = new ApplVerID(defaultApplVerId);
var assemblies = GetAppDomainAssemblies();
var factories = GetMessageFactories(assemblies);
_factories = ConvertToDictionary(factories);
}
Then when you receive an application message, it looks for the versioned factory.然后,当您收到应用程序消息时,它会查找版本化工厂。
If you do not have the dll in your path, the factory was not loaded, and it will generate an "Incorrect BeginString (FIXT.1.1)" error.如果您的路径中没有 dll,则说明工厂未加载,并且会生成“不正确的 BeginString (FIXT.1.1)”错误。
In my case I was not using versioned messages, only generic classes like Quickfix.Message and Quickfix.Group, so I was only using QuickFIXn.Core.dll.在我的例子中,我没有使用版本化消息,只使用像 Quickfix.Message 和 Quickfix.Group 这样的通用类,所以我只使用 QuickFIXn.Core.dll。 The first application message I received (a FIX.5.0SP2 message) raised this error.
我收到的第一条应用程序消息(FIX.5.0SP2 消息)引发了这个错误。
To fix it I added a reference to QuickFIXn.FIX.5.0SP2.dll, and now the dll is shipped with my binaries, the dll is loaded, the factory is found, and no more error.为了修复它,我添加了对 QuickFIXn.FIX.5.0SP2.dll 的引用,现在 dll 随我的二进制文件一起提供,dll 已加载,工厂已找到,并且不再有错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.