Support for Dynamic Acceptor Sessions in QuickFIX/J
I would like to request support for dynamic acceptor sessions in the quickfixj-spring-boot-starter framework. The dynamic acceptor feature in QuickFIX/J allows the program to handle sessions flexibly without predefined configurations for each session, using DynamicAcceptorSessionProvider.
For more details, you can refer to the QuickFIX/J user manual: Dynamic Acceptor Sessions.
Hi @ChildrenGreens,
Thanks for using the library. There is an example on how to use dynamic sessions here https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-server-dynamic-sessions
Are you referring to doing this but using auto configuration?
Thanks
@esanchezros Yes, is it possible to control whether to enable Dynamic Acceptor Sessions by using the properties attribute combined with auto configuration?
Not right using properties but you can override the Acceptor bean
@Bean
public Acceptor serverAcceptor(quickfix.Application serverApplication, MessageStoreFactory serverMessageStoreFactory,
SessionSettings serverSessionSettings, LogFactory serverLogFactory,
MessageFactory serverMessageFactory) throws ConfigError {
ThreadedSocketAcceptor threadedSocketAcceptor = new ThreadedSocketAcceptor(serverApplication, serverMessageStoreFactory, serverSessionSettings,
serverLogFactory, serverMessageFactory);
final SessionID anySession = new SessionID(BEGINSTRING_FIX40, WILDCARD, WILDCARD);
serverSessionSettings.setBool(anySession, SETTING_ACCEPTOR_TEMPLATE, true);
serverSessionSettings.setString(anySession, BEGINSTRING, BEGINSTRING_FIX44);
threadedSocketAcceptor.setSessionProvider(
new InetSocketAddress("0.0.0.0", 9876),
new DynamicAcceptorSessionProvider(serverSessionSettings, anySession, serverApplication, serverMessageStoreFactory,
serverLogFactory, serverMessageFactory)
);
return threadedSocketAcceptor;
}
I think this could be a nice feature in the qfj spring boot starter, I'll try adding it soon
@esanchezros I am currently using the override Acceptor bean. I would greatly appreciate it if you could add this feature to the QFJ Spring Boot Starter.