[QFJ-247] Allow for dynamic session addition in AbstractSocketInitiator Created: 22/Sep/07  Updated: 12/Nov/18  Resolved: 12/Nov/18

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Improvement Priority: Default
Reporter: Toli Kuznets Assignee: Andy Flury
Resolution: Fixed Votes: 4
Labels: None

Attachments: Text File AbstractSocketInitiator.java.patch    

 Description   

Right now you can have multiple sessions in same SocketInitiator only when you configure them at startup.
Would be nice to have a programmatic way to add new sessions to socket initiator dynamically, either via code an application level or via some JMX adapter.

It's possible to work around this by creating a new SocketIntiator, but that may create threading issues for people using single-threaded strategies and having single-threaded assumptions in their application code.

Not sure if the right way is to provide a AbstractSocketInitiator.addSession() (and removeSession) function, or if there's a better approach.



 Comments   
Comment by Danilo [ 06/May/08 ]

I need this too. Is there any other way to work around this while it's not implemented the way you propose?

Comment by Toli Kuznets [ 06/May/08 ]

Danilo, we've been working on the code to implement this but haven't had the time to polish it yet so we haven't checked it in. But i'm hoping to have that ready in a few weeks.

Comment by Steve Bate [ 10/Jan/10 ]

Hi Toli. Any updated status on this feature?

Comment by Toli Kuznets [ 15/Jan/10 ]

Steve,
Unfortunately, we never ended up implementing this, so it's still in RFE stage...

Comment by Cesar Kamoy [ 27/Jul/11 ]

I fully agree with Steve

Comment by Evan Ross [ 24/May/12 ]

Has this made any progress? I need the ability to create and destroy initiators at runtime.

Comment by Andy Flury [ 01/Oct/12 ]

Would like invest some time in this and come up with a solution and potential patch. Can somebody provide a hint how to approach this?

Comment by Andy Flury [ 01/Oct/12 ]

Ok, this is my first try.

I added a method createDynamicSession which takes a SessionID (that can be retriebed from settings). It will create the session and create the corresponding initiator.

Also, I added a new session level boolean setting "Inactive", that can be added to settings that should not start automatically when starting QuickFix. So this session can be started on demand with above new method. The constant SETTING_INACTIVE_SESSION would probably have to be moved somewhere else.

This might not be the proper way to do this, but it seems to be working.

Any comments are welcome

Andy

Generated at Sun May 05 10:05:49 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.