Re: [Quickfix-developers] How we will can invoke two sessions Qftrade and Qfstream in an application
Brought to you by:
orenmnero
From: Peter L. <pet...@eQ...> - 2009-10-23 22:58:16
|
Hi, > Hi, my config file in given below: > > I want to have tow session 1 for Qfstream and other for Qftrade. > > now the 1st issue is it alwaye pick the file log path and store path of 2nd > session defned.... As your BeginString, TargetCompID and SenderCompID are all the same for both sessions, you'd better to put a SessionQualifier to at least one of your sessions. This will separate it from the other. > as the qfix do not automatically pick up the arget sub id so i using > toAdmin callback as if teh 1st time the call back is invoked send the > target sub ID as Qfstream else qftrade. I'm not sure I understand you fully, but this doesn't look OK. 2 issues: 1. Do you really need to send TargetSubID in admin messages? Or rather in application messages? If so, use toApp... 2. More importantly, instead of "counting", you should investigate the SessionID you receive in the callback's parameter. Based on SessionQualifier you can distinct your two defined sessions and can decide which TargetSubID to send. HTH, Peter > i onle getting logon for qfstream > session. and the only los are sreated at the location of 2nd session > defined... while no log file is created at fle log path of 1sr session > defined in config. > > Here is the log file and config file > > 8=FIX.4.4 9=103 35=A 34=17 49=TW 50=user1 52=20091023-17:09:37.033 56=FXALL > 57=qfstream 96=123456 98=0 108=10 10=160 > 8=FIX.4.4 9=91 35=A 49=FXALL 56=TW 34=20 52=20091023-17:09:35.930 57=user1 > 50=qfstream 108=10 98=0 10=026 > 8=FIX.4.4 9=67 35=0 34=18 49=TW 50=user1 52=20091023-17:09:47.035 56=FXALL > 10=238 > 8=FIX.4.4 9=79 35=0 49=FXALL 56=TW 34=21 52=20091023-17:09:45.931 > 57=trader1 50=qfstream 10=251 > 8=FIX.4.4 9=67 35=0 34=19 49=TW 50=user1 52=20091023-17:09:57.039 56=FXALL > 10=244 > 8=FIX.4.4 9=79 35=0 49=FXALL 56=TW 34=22 52=20091023-17:09:55.932 > 57=trader1 50=qfstream 10=254 > 8=FIX.4.4 9=67 35=0 34=20 49=TW 50=user1 52=20091023-17:10:07.043 56=FXALL > 10=218 > 8=FIX.4.4 9=79 35=0 49=FXALL 56=TW 34=23 52=20091023-17:10:05.932 > 57=trader1 50=qfstream 10=242 > 8=FIX.4.4 9=67 35=0 34=21 49=TW 50=user1 52=20091023-17:10:17.047 56=FXALL > 10=224 > 8=FIX.4.4 9=79 35=5 49=FXALL 56=TW 34=30 52=20091023-17:11:09.683 57=user1 > 50=qfstream 10=253 > > > # default settings for sessions > [DEFAULT] > ConnectionType=initiator > ReconnectInterval=20 > LogonTimeout=30 > StartTime=00:00:00 > EndTime=23:00:00 > HeartBtInt=10 > #SocketConnectHost=localhost > SocketConnectHost=127.0.0.1 > SocketConnectPort=9000 > FileLogPath=c:\qfixlogs\ > FileStorePath=c:\qfixstore\ > > > > [SESSION] > BeginString=FIX.4.4 > TargetCompID=*ISLD* > TargetSubID=qftrade > SenderCompID=TW > SenderSubID=user1 > RawData=123456 > HeartBtInt=10 > FileLogPath=c:\qfixlogs\ > FileStorePath=c:\qfixstore\ > DataDictionary=C:\quickfix-1.12.4\quickfix\spec\FIX44.xml > > [SESSION] > BeginString=FIX.4.4 > TargetCompID=*ISLD* > TargetSubID=qfstream > SenderCompID=TW > SenderSubID=uer1 > RawData=123456 > HeartBtInt=10 > FileLogPath=c:\qfixlogs_acp\ > FileStorePath=c:\qfixstore_acp\ > DataDictionary=C:\quickfix-1.12.4\quickfix\spec\FIX44.xml > |