How we will can invoke two sessions Qftrade and Qfstream in an application

View: New views
5 Messages — Rating Filter:   Alert me  

How we will can invoke two sessions Qftrade and Qfstream in an application

by ch.asad@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HI,
I want to have two session Qftrade and Qfstream in my application. Any suggestion how can i do it and how i will handle them separately?
AS the only thin to me which is different in the configuration of to sessions is Target Sub ID. And what i observed is  Quick fix do not pick target sub ID and raw data fields form config file, when it send logon message. we have to manually add the field using the toAdmin call back.
How we will can invoke two sessions and handle them separately??
Do we need to create two different objects of FIX::Socketinitator but for that we we have two different config files( I think) or any other simple way to have this done.

Please suggest....

Thanks,
Asad

Re: How we will can invoke two sessions Qftrade and Qfstream in an application

by ch.asad@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In separate applications, i can connect to both but i want to do it in a single application...

ch.asad@gmail.com wrote:
HI,
I want to have two session Qftrade and Qfstream in my application. Any suggestion how can i do it and how i will handle them separately?
AS the only thin to me which is different in the configuration of to sessions is Target Sub ID. And what i observed is  Quick fix do not pick target sub ID and raw data fields form config file, when it send logon message. we have to manually add the field using the toAdmin call back.
How we will can invoke two sessions and handle them separately??
Do we need to create two different objects of FIX::Socketinitator but for that we we have two different config files( I think) or any other simple way to have this done.

Please suggest....

Thanks,
Asad

Re: How we will can invoke two sessions Qftrade and Qfstream in an application

by vbgargote :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes you can do it. You need to add the entries in the config file.
A session is created using a combination of senderID and targetID and stored
in a collection.
When you send a message using a "Session::Send(fix message) , the session
gets the senderIS and targetID from the fix message and searches for it in
the collection.If it finds a matching session data is send on that session.

So as many targetIDs in your config file you will have that many sessions.At
runtime you have to choose the targetID,that targetID will be set in the fix
message and do a "Send".
Hope this is what you are looking for.


Re: How we will can invoke two sessions Qftrade and Qfstream in an application

by ch.asad@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html


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 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  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.
 
Please suggest how can i fix this issue..
 
Here is the log file and config file
 
8=FIX.4.49=10335=A34=1749=TW50=user152=20091023-17:09:37.03356=ISLD57=qfstream96=fxall12398=0108=1010=160
8=FIX.4.49=9135=A49=ISLD56=TW34=2052=20091023-17:09:35.93057=user150=qfstream108=1098=010=026
8=FIX.4.49=6735=034=1849=TW50=user152=20091023-17:09:47.03556=ISLD10=238
8=FIX.4.49=7935=049=ISLD56=TW34=2152=20091023-17:09:45.93157=user150=qfstream10=251
8=FIX.4.49=7935=549=ISLD56=TW34=3052=20091023-17:11:09.68357=user150=qfstream10=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

On Fri, Oct 23, 2009 at 6:18 PM, vbgargote <vbgargote@...> wrote:
Yes you can do it. You need to add the entries in the config file.
A session is created using a combination of senderID and targetID and stored
in a collection.
When you send a message using a "Session::Send(fix message) , the session
gets the senderIS and targetID from the fix message and searches for it in
the collection.If it finds a matching session data is send on that session.

So as many targetIDs in your config file you will have that many sessions.At
runtime you have to choose the targetID,that targetID will be set in the fix
message and do a "Send".
Hope this is what you are looking for.


--
View this message in context: http://www.nabble.com/How-we-will-can-invoke-two-sessions-Qftrade-and-Qfstream-in-an-application-tp26023357p26025284.html
Sent from the QuickFIX - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Quickfix-developers mailing list
Quickfix-developers@...
https://lists.sourceforge.net/lists/listinfo/quickfix-developers


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Quickfix-developers mailing list
Quickfix-developers@...
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

Parent Message unknown Re: How we will can invoke two sessions Qftrade and Qfstream in an application

by Peter Leipold-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html


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
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Quickfix-developers mailing list
Quickfix-developers@...
https://lists.sourceforge.net/lists/listinfo/quickfix-developers