Thread: [Quickfix-users] SessionQualifier and MySQL
Brought to you by:
orenmnero
From: Nikolay P. <ko...@xl...> - 2006-03-21 17:33:26
|
We're developing acceptor application, but the specific is that we want to provide many clients to initiate sessions simultaneously. We use QuickFIX 1.11 with MySQL storing end logging. I tried to use SessionQualifier, but it doesn't works in way I expected. Two initators with same BeginString, SenderCompID, TargetCompID and different SessionQualifier can't logon simultaneously. On acceptor side there are no record with nonempty SessionQualifier field in session table. One initator logins successfully, but all other initator logs is flooded with: 20060321-16:41:08 : Connecting to localhost on port 5001 20060321-16:41:09 : Connection succeeded 20060321-16:41:09 : Initiated logon request 20060321-16:41:09 : Socket Error: Connection reset by peer. 20060321-16:41:09 : Disconnecting Have you an idea, where is my mistake? -- View this message in context: http://www.nabble.com/SessionQualifier-and-MySQL-t1318780.html#a3517035 Sent from the QuickFIX - User forum at Nabble.com. |
From: Joerg T. <Joe...@ma...> - 2006-03-22 08:58:13
|
Privet, Nikolay, > We're developing acceptor application, but the specific is that we want= to > provide many clients to initiate sessions simultaneously. We use QuickF= IX > 1.11 with MySQL storing end logging. I tried to use SessionQualifier, b= ut it > doesn't works in way I expected. Two initators with same BeginString, > SenderCompID, TargetCompID and different SessionQualifier can't logon > simultaneously. > On acceptor side there are no record with nonempty SessionQualifier fie= ld in > session table.=20 > One initator logins successfully, but all other initator logs is floode= d > with: > 20060321-16:41:08 : Connecting to localhost on port 5001 > 20060321-16:41:09 : Connection succeeded > 20060321-16:41:09 : Initiated logon request > 20060321-16:41:09 : Socket Error: Connection reset by peer. > 20060321-16:41:09 : Disconnecting > Have you an idea, where is my mistake? The SessionQualifier was introduced -- if I recollect correctly -- to all= ow QF to manage=20 several sessions with same SenderCompID and TargetCompID, _but_ different= accept ports. Before that a QF session was uniquely identified by (BeginString, SenderC= ompID, TargetCompID). The important point in your case is that the SessionQualifier is _not_ tr= ansmitted over=20 the wire, ie if both of your initiator clients has a different SessionQua= lifier=20 configured, but connect to the _same_ port with identical (BeginString, S= enderCompID,=20 TargetCompID), QF will forward these requests to the _same_ session, whic= h results in the=20 disconnects (since the session is already logged on). Please try with different ports for each different qualifier. Cheers, J=F6rg --=20 Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Oren M. <or...@qu...> - 2006-03-22 09:22:13
|
Yeah, it was mostly designed to be used with initiators to get around =20= a design flaw of some systems where they have different sessions =20 using the same session identifier on different ports. The =20 functionality was not put in to enable this design flaw. I would =20 reccommend instead that you vary the compIDs as is intended by the =20 protocol. --oren On Mar 22, 2006, at 2:57 AM, Joerg Thoennes wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/=20 > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Privet, Nikolay, > >> We're developing acceptor application, but the specific is that we =20= >> want to >> provide many clients to initiate sessions simultaneously. We use =20 >> QuickFIX >> 1.11 with MySQL storing end logging. I tried to use =20 >> SessionQualifier, but it >> doesn't works in way I expected. Two initators with same BeginString, >> SenderCompID, TargetCompID and different SessionQualifier can't logon >> simultaneously. >> On acceptor side there are no record with nonempty =20 >> SessionQualifier field in >> session table. One initator logins successfully, but all other =20 >> initator logs is flooded >> with: >> 20060321-16:41:08 : Connecting to localhost on port 5001 >> 20060321-16:41:09 : Connection succeeded >> 20060321-16:41:09 : Initiated logon request >> 20060321-16:41:09 : Socket Error: Connection reset by peer. >> 20060321-16:41:09 : Disconnecting >> Have you an idea, where is my mistake? > > The SessionQualifier was introduced -- if I recollect correctly -- =20 > to allow QF to manage several sessions with same SenderCompID and =20 > TargetCompID, _but_ different accept ports. > > Before that a QF session was uniquely identified by (BeginString, =20 > SenderCompID, TargetCompID). > > The important point in your case is that the SessionQualifier is =20 > _not_ transmitted over the wire, ie if both of your initiator =20 > clients has a different SessionQualifier configured, but connect to =20= > the _same_ port with identical (BeginString, SenderCompID, =20 > TargetCompID), QF will forward these requests to the _same_ =20 > session, which results in the disconnects (since the session is =20 > already logged on). > > Please try with different ports for each different qualifier. > > Cheers, J=F6rg > > --=20 > Joerg Thoennes > http://macd.com > Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH > Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting =20 > language > that extends applications into web and mobile media. Attend the =20 > live webcast > and join the prime developer group breaking into this new coding =20 > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid$1720&dat=121642= > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > |
From: Nikolay P. <ko...@xl...> - 2006-03-22 11:33:08
|
Thank you for reply That's not admissible for us to vary the compIDs. The proplem is that we need to restart our acceptor when a new initator wants to connect acceptor. However SessionQualifier is not written in session table, so we cant disambiguate identical sessions (except BeginString, SenderCompID, TargetCompID) even if connection set up on different ports. Maybe someone can intoduse another way of solving this problem? -- View this message in context: http://www.nabble.com/SessionQualifier-and-MySQL-t1318780.html#a3530560 Sent from the QuickFIX - User forum at Nabble.com. |
From: Joerg T. <Joe...@ma...> - 2006-03-22 11:45:13
|
Nikolay Parshutin wrote: > However SessionQualifier is not written in session table, so we cant > disambiguate identical sessions (except BeginString, SenderCompID, > TargetCompID) even if connection set up on different ports. >=20 > Maybe someone can intoduse another way of solving this problem? OK, so you are saying that even with different ports it does not work in = your case? Please provide some code which demonstrates how you try to disambiguate i= dentical=20 sessions. Maybe there is something missing in QF, which can be easily add= ed. Cheers, J=F6rg --=20 Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Nikolay P. <ko...@xl...> - 2006-03-22 12:33:57
|
Example about using SessionQuilifier with connections on different ports. Using QuickFix examples executor and tradeclient with : -------------------------------------------------------executor.cfg------------------------------------------------------- [DEFAULT] ConnectionType=acceptor SocketAcceptPort=5001 StartTime=00:00:00 EndTime=00:00:00 DataDictionary=../spec/FIX42.xml [SESSION] BeginString=FIX.4.2 SenderCompID=EXECUTOR TargetCompID=CLIENT1 FileStorePath=store [SESSION] BeginString=FIX.4.2 SenderCompID=EXECUTOR TargetCompID=CLIENT1 FileStorePath=store SocketAcceptPort=5002 [SESSION] BeginString=FIX.4.2 SenderCompID=EXECUTOR TargetCompID=CLIENT1 FileStorePath=store SocketAcceptPort=5003 [SESSION] BeginString=FIX.4.2 SenderCompID=EXECUTOR TargetCompID=CLIENT1 FileStorePath=store SocketAcceptPort=5004 -------------------------------------------------------tradeclient.cfg------------------------------------------------------- [DEFAULT] ConnectionType=initiator HeartBtInt=30 FileStorePath=store FileLogPath=log StartTime=00:00:00 EndTime=00:00:00 UseDataDictionary=N SocketConnectHost=localhost SocketConnectPort=5001 [SESSION] BeginString=FIX.4.2 SenderCompID=CLIENT1 TargetCompID=EXECUTOR SessionQualifier=TC1 SocketConnectPort=5001 [SESSION] BeginString=FIX.4.2 SenderCompID=CLIENT1 TargetCompID=EXECUTOR SocketConnectPort=5002 SessionQualifier=TC2 [SESSION] BeginString=FIX.4.2 SenderCompID=CLIENT1 TargetCompID=EXECUTOR SocketConnectPort=5003 SessionQualifier=TC3 and wgat i've got with tradeclient: 1) Enter Order 2) Cancel Order 3) Replace Order 4) Market data test 5) Quit Action: Logon - FIX.4.2:CLIENT1->EXECUTOR:TC1 and executor printed no explanation of the reason why other sessions had not log on -- View this message in context: http://www.nabble.com/SessionQualifier-and-MySQL-t1318780.html#a3531315 Sent from the QuickFIX - User forum at Nabble.com. |
From: Joerg T. <Joe...@ma...> - 2006-03-22 13:06:26
|
Nikolay Parshutin wrote: Now we are getting to the point... > -------------------------------------------------------executor.cfg----= --------------------------------------------------- > [...] > [SESSION] > BeginString=3DFIX.4.2 > SenderCompID=3DEXECUTOR > TargetCompID=3DCLIENT1 > FileStorePath=3Dstore > SocketAcceptPort=3D5001 (I moved the SocketAcceptPort down from DEFAULT section...) Where is the line "SessionQualifier=3DTC1"? Otherwise, the acceptor has n= o way to know that=20 this is "TC1". As I said, the SessionQualifier is not FIX field and is no= t transmitted=20 over the connection, but is just a kludge to differentiate sessions which= do not differ in=20 the BeginString, SenderCompID or TargetCompID field, but e.g. by ports. Please add the matching lines with SessionQualifier to the executor.cfg, = and it should work. > -------------------------------------------------------tradeclient.cfg-= --------------------------------------------------- > [...] > [SESSION] > BeginString=3DFIX.4.2 > SenderCompID=3DCLIENT1 > TargetCompID=3DEXECUTOR > SessionQualifier=3DTC1 > SocketConnectPort=3D5001 >=20 > and wgat i've got with tradeclient: > 1) Enter Order > 2) Cancel Order > 3) Replace Order > 4) Market data test > 5) Quit > Action: > Logon - FIX.4.2:CLIENT1->EXECUTOR:TC1 Hope that solves your issue. Cheers, J=F6rg --=20 Joerg Thoennes http://macd.com Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen |
From: Nikolay P. <ko...@xl...> - 2006-03-22 13:15:43
|
No, it does not work. Error in acceptor: "Configuration failed: SessionQualifier cannot be used with acceptor." -- View this message in context: http://www.nabble.com/SessionQualifier-and-MySQL-t1318780.html#a3531956 Sent from the QuickFIX - User forum at Nabble.com. |
From: Oren M. <or...@qu...> - 2006-03-22 15:15:24
|
Yeah, as I said, the qualifier was designed to be used with initiators. Also note that you cannot currently set up different acceptor sessions on different ports. SocketAcceptPort can only exist in the DEFAULT section. Therefore, every acceptor session in a single config file must share a port. This may change in the future, but that is how it is right now. Basically, what you are trying to do is not supported internally. You would need to run multiple processes to do what you want. --oren Nikolay Parshutin wrote: >QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html >QuickFIX Support: http://www.quickfixengine.org/services.html > > >No, it does not work. >Error in acceptor: "Configuration failed: SessionQualifier cannot be used >with acceptor." > > >-- >View this message in context: http://www.nabble.com/SessionQualifier-and-MySQL-t1318780.html#a3531956 >Sent from the QuickFIX - User forum at Nabble.com. > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >Quickfix-users mailing list >Qui...@li... >https://lists.sourceforge.net/lists/listinfo/quickfix-users > > > > |
From: Joerg T. <Joe...@we...> - 2006-03-22 16:19:57
|
Oren Miller wrote: > Yeah, as I said, the qualifier was designed to be used with initiators.= =20 > Also note that you cannot currently set up different acceptor sessions=20 > on different ports. SocketAcceptPort can only exist in the DEFAULT=20 > section. Therefore, every acceptor session in a single config file mus= t=20 > share a port. This may change in the future, but that is how it is=20 > right now. Basically, what you are trying to do is not supported=20 > internally. You would need to run multiple processes to do what you wa= nt. Sorry for the confusion I caused. I should have looked at the code instea= d thinking what=20 should be on the acceptor side. Maybe we could have a check for SocketAcceptPort outside DEFAULT section? Cheers, J=F6rg |
From: Nikolay P. <ko...@xl...> - 2006-03-22 12:33:58
|
I just compile executor sample with support of MySQL. I expacted that, even single initated connection using Session Qualifier will be mirrored in session table with SessionQuilifier field filled with corresponding value. But it's empty! When I use FileStore instead MySQL database, sessions are stored, but then apear error i explained before. I don't understand, is SessionQuilifier works somewhere at all? If it does, please, explain how. I have not found any clear documentation, exacmple or usecase of that. If it doesn't, please, explain how can I append sessions without restarting acceptor. -- View this message in context: http://www.nabble.com/SessionQualifier-and-MySQL-t1318780.html#a3531314 Sent from the QuickFIX - User forum at Nabble.com. |