c# - QuickFix/n multiple Session on the same port -


should able run multiple session on same port in quickfix/n?

i have following config

[default] connectiontype=acceptor reconnectinterval=2 filestorepath=store filelogpath=fixlog persistmessages=n starttime=00:00:00 endtime=00:00:00 logouttimeout=5 resetonlogon=y usedatadictionary=y validatefieldsoutoforder=n allowunknownmsgfields=y validateuserdefinedfields=n validatefieldshavevalues=n appdatadictionary=config/fix/fix50sp2.xml transportdatadictionary=config/fix/fixt11.xml beginstring=fixt.1.1 defaultapplverid=fix.5.0sp2 heartbtint=30 sendercompid=mercuria sendersubid=1 socketacceptport=5011 [session] targetcompid=client1 socketacceptport=5011 targetsubid=1 heartbtint=30 [session] targetcompid=client1 socketacceptport=5011 targetsubid=2 heartbtint=30 [session] targetcompid=client1 socketacceptport=5011 targetsubid=3 heartbtint=30 

but when run , logon client 1 subid of 1 "an existing connection forcibly closed remote host" error.

2015-07-10 09:34:33,729 [21] info  mercuria.olympus.fixinterface.common.cracker.log4netlog [(null)] - onevent - fixt.1.1:mercuria/1->client1/1 - responding logon request 2015-07-10 09:34:33,733 [21] info  mercuria.olympus.fixinterface.common.cracker.fixinterfaceapplication [(null)] - onlogon called 2015-07-10 09:34:36,069 [backgroundtasks] debug mercuria.olympus.common.core.entitydata.entitycachemanager [(null)] - id=common.extendedproductcachemanager, supplyrows=21249 2015-07-10 09:34:36,116 [backgroundtasks] debug mercuria.olympus.common.core.entitydata.entitycachemanager [(null)] - entitycachemanager id=common.extendedproductcachemanager, entityupdatecount=21249 2015-07-10 09:35:03,739 [21] info  mercuria.olympus.fixinterface.common.cracker.fixinterfaceapplication [(null)] - out admin 8=fixt.1.19=6835=034=249=mercuria50=152=20150710-08:35:03.73956=client157=110=038 2015-07-10 09:35:03,740 [21] info  mercuria.olympus.fixinterface.common.cracker.log4netlog [(null)] - onoutgoing - fixt.1.1:mercuria/1->client1/1 - 8=fixt.1.19=6835=034=249=mercuria50=152=20150710-08:35:03.73956=client157=110=038 2015-07-10 09:35:04,670 [21] info  mercuria.olympus.fixinterface.common.cracker.log4netlog [(null)] - onevent - fixt.1.1:mercuria/1->client1/1 - session fixt.1.1:mercuria/1->client1/1 disconnecting: socket exception (127.0.0.1:47045): existing connection forcibly closed remote host 2015-07-10 09:35:04,671 [21] info  mercuria.olympus.fixinterface.common.cracker.fixinterfaceapplication [(null)] - onlogout called 

this works alright if change session config have different send compids so:

[session] targetcompid=client1 socketacceptport=5011 heartbtint=30 [session] targetcompid=client2 socketacceptport=5011 heartbtint=30 

is config valid i.e. using multiple session on same port same comp id differing sender/target subid?

thanks, nick

an acceptor can accept multiple connections on same port, must have unique targetcompids.


Comments