esanchezros / quickfixj-spring-boot-starter

Spring Boot Starter for QuickFIX/J
Apache License 2.0
126 stars 59 forks source link

Make `MessageStoreFactory` and `LogFactory` beans auto configurable #48

Closed esanchezros closed 4 years ago

esanchezros commented 4 years ago

Currently, the MessageStoreFactory and LogFactory beans are defaulted to FileStoreFactory and ScreenLogFactory types and the configuration for these factories lives in the quickfixj config file. These factories should be auto configurable via a property in the spring boot starter that will automatically create the correct bean:

quickfixj.server.message-store-factory=memory # [cachedfile,file,jdbc,memory,noop,sleepycat] (default: `memory`)
quickfixj.server.log-factory=screen # [compositelog,file,jdbc,slf4j,screen] (default: `screen`)
quickfixj.client.message-store-factory=memory # [cachedfile,file,jdbc,memory,noop,sleepycat] (default: `memory`)
quickfixj.client.log-factory=screen # [compositelog,file,jdbc,slf4j,screen] (default: `screen`)

For example, a quickfixj.server.message-store-factory=jdbc would create a JdbcStoreFactory bean. The same for the other types.

esanchezros commented 4 years ago

Done on 2.7.0