Reputation: 7877
I can configure multiple sessions in a single QuickFIX/J settings file and then start them all with a single SocketInitiator
. But I would like to be able to modify the configuration of one or more sessions and then restart just those sessions without affecting any others.
I could do this by having multiple settings files and using one SocketInitiator
per session. But it seems as though QuickFIX/J is not intended to be used this way. Would it cause me any problems?
Upvotes: 4
Views: 2605
Reputation: 3283
It is perfectly fine to start up an Initiator
per session. It is a matter of taste. In any case: having a separate Initiator
per session is independent and will not affect the other sessions.
If you want to follow the approach with a single Initiator
then you could try to add/remove sessions dynamically via createDynamicSession()
/removeDynamicSession()
. There still is some manual work though.
Session
that you want to reload. logout()
and close()
it.removeDynamicSession()
for that Session
.SessionID
that you want to reload from the running Initiator
. Remove these from the running Initiator
via removeSetting()
.Session
and put them to the settings of the Initiator
.createDynamicSession()
for the SessionID
Upvotes: 4