{"id":24292326,"url":"https://github.com/esanchezros/quickfixj-spring-boot-starter","last_synced_at":"2025-05-16T00:03:19.873Z","repository":{"id":37406124,"uuid":"109327955","full_name":"esanchezros/quickfixj-spring-boot-starter","owner":"esanchezros","description":"Spring Boot Starter for QuickFIX/J","archived":false,"fork":false,"pushed_at":"2025-05-15T20:19:04.000Z","size":731,"stargazers_count":144,"open_issues_count":3,"forks_count":67,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-16T00:02:33.102Z","etag":null,"topics":["financial","fixprotocol","java","quickfixj","spring","spring-boot","spring-boot-actuator","spring-boot-starter"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esanchezros.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-02T23:06:07.000Z","updated_at":"2025-05-15T20:19:07.000Z","dependencies_parsed_at":"2023-02-13T19:30:39.255Z","dependency_job_id":"747dfc7f-8b41-4d89-a52e-d6e9922907ea","html_url":"https://github.com/esanchezros/quickfixj-spring-boot-starter","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanchezros%2Fquickfixj-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanchezros%2Fquickfixj-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanchezros%2Fquickfixj-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esanchezros%2Fquickfixj-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esanchezros","download_url":"https://codeload.github.com/esanchezros/quickfixj-spring-boot-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442858,"owners_count":22071878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["financial","fixprotocol","java","quickfixj","spring","spring-boot","spring-boot-actuator","spring-boot-starter"],"created_at":"2025-01-16T15:29:33.308Z","updated_at":"2025-05-16T00:03:19.842Z","avatar_url":"https://github.com/esanchezros.png","language":"Java","readme":"image:https://dl.circleci.com/status-badge/img/gh/esanchezros/quickfixj-spring-boot-starter/tree/main.svg?style=shield[\"CircleCI\", link=\"https://dl.circleci.com/status-badge/redirect/gh/esanchezros/quickfixj-spring-boot-starter/tree/main\"]\nimage:https://codecov.io/gh/esanchezros/quickfixj-spring-boot-starter/branch/main/graph/badge.svg?token=DhK6IBGZMS[\"codecov\",link=\"https://codecov.io/gh/esanchezros/quickfixj-spring-boot-starter\"]\nimage:https://img.shields.io/badge/maven%20central-v3.3.0-blue.svg[\"Maven Central\",link=\"https://search.maven.org/#search%7Cga%7C1%7Ca%3A%22quickfixj-spring-boot-starter%22\"]\nimage:https://img.shields.io/hexpm/l/plug.svg[\"Apache 2\",link=\"http://www.apache.org/licenses/LICENSE-2.0\"]\nimage:https://img.shields.io/badge/quickfixj-2.3.2-blue.svg[\"QuickFIX/J 2.3.2\", link=\"https://github.com/quickfix-j/quickfixj\"]\nimage:https://app.codacy.com/project/badge/Grade/1c6bf92b53324a45ba587e061dc6547d[\"Codacy code quality\", link=\"https://www.codacy.com/gh/esanchezros/quickfixj-spring-boot-starter/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=esanchezros/quickfixj-spring-boot-starter\u0026utm_campaign=Badge_Grade\"]\nimage:https://api.securityscorecards.dev/projects/github.com/esanchezros/quickfixj-spring-boot-starter/badge[\"OpenSSF Scorecard\", link=\"https://securityscorecards.dev/viewer/?uri=github.com/esanchezros/quickfixj-spring-boot-starter\"]\n\n= Spring Boot Starter for QuickFIX/J (Spring Boot 3)\n\nThis project is a https://spring.io/projects/spring-boot/[Spring Boot Starter] for https://github.com/quickfix-j/quickfixj[QuickFIX/J messaging engine for the FIX protocol].\nIt simplifies the configuration required to create and start an https://www.quickfixj.org/javadoc/2.3.0/quickfix/Initiator.html[Initiator] or https://www.quickfixj.org/javadoc/2.3.0/quickfix/Acceptor.html[Acceptor], and handles the lifecycle of the https://www.quickfixj.org/javadoc/2.3.0/quickfix/Connector.html[Connector].\n\n== Terminology\n\nIn this Spring Boot Starter, QuickFIX/J Server is equivalent to `Acceptor` and QuickFIX/J Client to `Initiator`.\n\n== Getting started\n\nTo use the QuickFIX/J Server or QuickFIX/J Client you need to add the QuickFIX/J Spring Boot Starter dependency in your project.\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.allune\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e3.3.0\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n## QuickFIX/J Runtime\n\nThe QuickFIX/J Spring Boot Starter no longer includes ```quickfixj-messages-all``` dependency and now includes the standard published FIX specification versions from FIX 4.0 to FIX Latest built by the QuickFIX/J project as __optional__ dependency. They are **not** specified as _runtime_ dependencies any longer, which makes it easier to customise QuickFIX/J deployments.\n\nIf you do not need to customise a FIX integration then you can use the ```org.quickfixj``` artefacts built by the QuickFIX/J project. Include them as dependencies of your application.\n\nFor more information about customising the QuickFIX/J Runtime refer to https://github.com/quickfix-j/quickfixj?tab=readme-ov-file#quickfixj-runtime\n\nFor example, import the `quickfixj-spring-boot-started` pom in your `dependencyManagement` section:\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.allune\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e3.3.0\u003c/version\u003e\n    \u003ctype\u003epom\u003c/type\u003e\n    \u003cscope\u003eimport\u003c/scope\u003e\n\u003c/dependency\u003e\n----\n\nand add the specific version(s) of the FIX messages you need in your project `dependencies`:\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.allune\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-spring-boot-starter\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.quickfixj\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-messages-fix44\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.quickfixj\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-messages-fix50\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n== Breaking changes with previous versions\n\nDue to the changes in https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#core-container[how dependencies are autowired from Spring Framework 6.1] and https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#parameter-name-discovery[Parameter Name Discovery], having the quickfixj client and server in the same spring context is not supported.\n\nIf you have an application that need to use both, or multiple of one, you can use the following approach to separate the Spring contexts and configurations:\n\n[source,java]\n----\npublic class ApplicationConfiguration {\n\n    public static void main(String[] args) {\n        SpringApplicationBuilder parentBuilder\n            = new SpringApplicationBuilder(QuickFixJCommonConfiguration.class)\n                .web(WebApplicationType.NONE);\n        parentBuilder.run(args);\n\n        parentBuilder.child(QuickFixJServerYourCompanyContextConfiguration.class)\n                .properties(\"spring.config.name=server\")\n                .web(WebApplicationType.SERVLET).run(args);\n        parentBuilder.child(QuickFixJClientNDAQContextConfiguration.class)\n                .properties(\"spring.config.name=ndaq\")\n                .web(WebApplicationType.SERVLET).run(args);\n        parentBuilder.child(QuickFixJClientFOREXContextConfiguration.class)\n                .properties(\"spring.config.name=forex\")\n                .web(WebApplicationType.SERVLET).run(args);\n        parentBuilder.child(QuickFixJClientDOWJONESContextConfiguration.class)\n                .properties(\"spring.config.name=dow-jones\")\n                .web(WebApplicationType.SERVLET).run(args);\n    }\n\n    @Configuration\n    public class QuickFixJCommonConfiguration {\n\n        @Bean\n        public QuickFixJTemplate quickFixJTemplate() {\n            return new QuickFixJTemplate();\n        }\n    }\n\n\n    @EnableAutoConfiguration\n    @Configuration\n    public class QuickFixJServerYourCompanyContextConfiguration {\n        // override beans if required\n    }\n\n    @EnableAutoConfiguration\n    @Configuration\n    public class QuickFixJClientNDAQContextConfiguration {\n        // override beans if required\n    }\n\n    @EnableAutoConfiguration\n    @Configuration\n    public class QuickFixJClientFOREXContextConfiguration {\n        // override beans if required\n    }\n\n    @EnableAutoConfiguration\n    @Configuration\n    public class QuickFixJClientDOWJONESContextConfiguration {\n        // override beans if required\n    }\n}\n----\n\n== QuickFIX/J Spring Boot Starter - Server (Acceptor)\n\n=== Enabling QuickFix/J Server\n\nAdding `quickfixj.server.enabled=true` in your properties file will configure an Acceptor with all the default QuickFix/J components:\n\n* A `MessageStoreFactory` of type `MemoryStoreFactory`.\n* A `LogFactory` of type `ScreenLogFactory`.\n* An `Acceptor` of type `SocketAcceptor`.\n* An `Application` of type `EventPublisherApplicationAdapter`.\n* If quickfixj.server.concurrent.useDefaultExecutorFactory is set to `true`, an `ExecutorFactory` is configured and added to the `Acceptor`.\n\nAll these QuickFix/J components can be configured via properties or by overriding the default beans.\n\nNote that `@EnableQuickFixJServer` has been deprecated in version `3.0.1`.\n\nFor example:\n\n[source,java]\n----\n@SpringBootApplication\npublic class AppServer {\n\n    public static void main(String[] args) {\n        SpringApplication.run(AppServer.class, args);\n    }\n\n    @Bean\n    public Application serverApplication() {\n        return new ServerApplicationAdapter(); // Provide your own implementation here\n    }\n\n    @Bean\n    public Acceptor severAcceptor(\n            Application serverApplication,\n            MessageStoreFactory serverMessageStoreFactory,\n            SessionSettings serverSessionSettings,\n            LogFactory serverLogFactory,\n            MessageFactory serverMessageFactory\n    ) throws ConfigError {\n        return new ThreadedSocketAcceptor(serverApplication, serverMessageStoreFactory, serverSessionSettings,\n                serverLogFactory, serverMessageFactory);\n    }\n\n    @Bean\n    public LogFactory serverLogFactory(SessionSettings serverSessionSettings) {\n        return new FileLogFactory(serverSessionSettings);\n    }\n}\n----\n\n=== Configuring the QuickFix/J Server\n\nAdditionally, you need to follow the https://www.quickfixj.org/usermanual/2.3.0/usage/configuration.html[configuration guide]\nto configure the FIX sessions. The configuration is resolved using the following approach:\n\n* By a QuickFIX/J configuration string defined by the `quickfixj.server.configString` property\n* By the presence of a `quickfix.SessionSettings` bean named `serverSessionSettings`\n* By a configuration file defined by the `quickfixj.server.config` property\n* By the presence of the `quickfixj.server.config` system property\n* By a `quickfixj-server.cfg` in the working directory or at the root of the classpath\n\n=== QuickFIX/J Server properties\n\n[cols=\"3*\", options=\"header\"]\n|===\n|Property\n|Example\n|Description\n\n|quickfixj.server.enabled\n|true\n|Whether the QuickFix/J Server is enabled.\n\n|quickfixj.server.config\n|classpath:quickfixj-server.cfg\n|Location of the QuickFix/J configuration file.\n\n|quickfixj.server.configString\n|[default]  \\r\\n\\... (see below for an example)\n|The content of the QuickFIX/J configuration file. This property takes precedence over `quickfixj.server.config`.\n\n|quickfixj.server.auto-startup\n|true\n|Whether to autostart the connection manager at start up (default: `true`).\n\n|quickfixj.server.force-disconnect\n|false\n|Whether logged on sessions should be disconnected forcibly when the connector is stopped (default: `false`).\n\n|quickfixj.server.phase\n|0\n|Phase in which this connection manager should be started and stopped (default: `Integer.MAX_VALUE`).\n\n|quickfixj.server.jmx-enabled\n|true\n|Whether to register the jmx mbeans for the acceptor (default: `false`).\n\n|quickfixj.server.message-store-factory\n|memory\n|Type of `MessageStoreFactory` to create. Supported values: `cachedfile`, `file`, `jdbc`, `memory`, `noop`, `sleepycat` (default: `memory`).\n\n|quickfixj.server.log-factory\n|screen\n|Type of `LogFactory` to create. Supported values: `compositelog`, `file`, `jdbc`, `slf4j`, `screen` (default: `screen`).\n\n|quickfixj.server.concurrent.enabled\n|true\n|Whether to use a simple `SocketAcceptor` or a `ThreadedSocketAcceptor` (default: `false` - uses `SocketAcceptor`).\n\n|quickfixj.server.concurrent.useDefaultExecutorFactory\n|true\n|Whether to use a default `ExecutorFactory` to create the `Acceptor` (default: `false`).\n\n|quickfixj.server.concurrent.queueCapacity\n|`Integer.MAX_VALUE`\n|When using the default `ExecutorFactory`, the Executor's queue capacity (default: `Integer.MAX_VALUE`).\n\n|quickfixj.server.concurrent.corePoolSize\n|8\n|When using the default `ExecutorFactory`, the Executor's core pool size (default: `8`).\n\n|quickfixj.server.concurrent.maxPoolSize\n|`Integer.MAX_VALUE`\n|When using the default `ExecutorFactory`, the Executor's max pool size (default: `Integer.MAX_VALUE`).\n\n|quickfixj.server.concurrent.allowCoreThreadTimeOut\n|true\n|When using the default `ExecutorFactory`, whether to allow core thread timeout on the Executor (default: `true`).\n\n|quickfixj.server.concurrent.keepAliveSeconds\n|60\n|When using the default ExecutorFactory, the Executor's keep alive in seconds (default: `60`).\n\n|quickfixj.server.concurrent.waitForTasksToCompleteOnShutdown\n|false\n|When using the default ExecutorFactory, whether to wait for tasks to complete on shutdown on the Executor (default: `false`).\n\n|quickfixj.server.concurrent.awaitTerminationSeconds\n|0\n|When using the default ExecutorFactory, the Executor's await termination in seconds (default: `0`).\n\n|quickfixj.server.concurrent.threadNamePrefix\n|QuickFixJ Spring Boot Starter thread-\n|When using the default ExecutorFactory, the Executor's thread name prefix (default: `QuickFixJ Spring Boot Starter thread-`).\n|===\n\nFor example:\n\n[source,properties]\n----\nquickfixj.server.enabled=true\nquickfixj.server.config=classpath:quickfixj-server.cfg\nquickfixj.server.configString=[default]  \\r\\n\\... (see below for an example)\nquickfixj.server.auto-startup=true\nquickfixj.server.force-disconnect=false\nquickfixj.server.phase=0\nquickfixj.server.jmx-enabled=true\nquickfixj.server.message-store-factory=memory\nquickfixj.server.log-factory=screen\n\nquickfixj.server.concurrent.enabled=true\nquickfixj.server.concurrent.useDefaultExecutorFactory=true\nquickfixj.server.concurrent.queueCapacity=Integer.MAX_VALUE\nquickfixj.server.concurrent.corePoolSize=8\nquickfixj.server.concurrent.maxPoolSize=Integer.MAX_VALUE\nquickfixj.server.concurrent.allowCoreThreadTimeOut=true\nquickfixj.server.concurrent.keepAliveSeconds=60\nquickfixj.server.concurrent.waitForTasksToCompleteOnShutdown=false\nquickfixj.server.concurrent.awaitTerminationSeconds=0\nquickfixj.server.concurrent.threadNamePrefix=\"QuickFixJ Spring Boot Starter thread-\"\n----\n\n[source,yml]\n----\nquickfixj:\n  server:\n    enabled: true\n    config: classpath:quickfixj-server.cfg\n    auto-startup: true\n    force-disconnect: false\n    phase: 0\n    jmx-enabled: true\n    concurrent:\n      enabled: true\n      useDefaultExecutorFactory: true\n      queueCapacity: Integer.MAX_VALUE\n      corePoolSize: 8\n      maxPoolSize: Integer.MAX_VALUE\n      allowCoreThreadTimeOut: true\n      keepAliveSeconds: 60\n      waitForTasksToCompleteOnShutdown: false\n      awaitTerminationMillis: 0\n      threadNamePrefix: \"QuickFixJ Spring Boot Starter thread-\"\n    message-store-factory: memory\n    log-factory: screen\n----\n\n=== QuickFIX/J Server configuration file in properties and yaml files\n\nUsing the `quickfixj.server.configString` property:\n\n[source,properties]\n----\nquickfixj.server.configString=[default]  \\r\\n\\\n                              FileStorePath=target/data/executor  \\r\\n\\\n                              ConnectionType=acceptor  \\r\\n\\\n                              StartTime=00:00:00  \\r\\n\\\n                              EndTime=00:00:00  \\r\\n\\\n                              HeartBtInt=30  \\r\\n\\\n                              ValidOrderTypes=1,2,F  \\r\\n\\\n                              SenderCompID=EXEC  \\r\\n\\\n                              TargetCompID=BANZAI  \\r\\n\\\n                              UseDataDictionary=Y  \\r\\n\\\n                              DefaultMarketPrice=12.30  \\r\\n\\\n                              FileLogPath=logs-server  \\r\\n\\\n                              \\r\\n\\\n                              [session]  \\r\\n\\\n                              BeginString=FIX.4.0  \\r\\n\\\n                              SocketAcceptPort=9876  \\r\\n\\\n                              \\r\\n\\\n                              [session]  \\r\\n\\\n                              BeginString=FIX.4.1  \\r\\n\\\n                              SocketAcceptPort=9877  \\r\\n\\\n                              \\r\\n\\\n                              [session]  \\r\\n\\\n                              BeginString=FIX.4.2  \\r\\n\\\n                              SocketAcceptPort=9878  \\r\\n\\\n                              \\r\\n\\\n                              [session]  \\r\\n\\\n                              BeginString=FIX.4.3  \\r\\n\\\n                              SocketAcceptPort=9879  \\r\\n\\\n                              \\r\\n\\\n                              [session]  \\r\\n\\\n                              BeginString=FIX.4.4  \\r\\n\\\n                              SocketAcceptPort=9880  \\r\\n\\\n                              \\r\\n\\\n                              [session]  \\r\\n\\\n                              BeginString=FIXT.1.1  \\r\\n\\\n                              DefaultApplVerID=FIX.5.0SP2  \\r\\n\\\n                              SocketAcceptPort=9881\n----\n\n[source,yml]\n----\nquickfixj:\n  server:\n    configString: |\n      [default]\n      FileStorePath=target/data/executor\n      ConnectionType=acceptor\n      StartTime=00:00:00\n      EndTime=00:00:00\n      HeartBtInt=30\n      ValidOrderTypes=1,2,F\n      SenderCompID=EXEC\n      TargetCompID=BANZAI\n      UseDataDictionary=Y\n      DefaultMarketPrice=12.30\n      FileLogPath=logs-server\n\n      [session]\n      BeginString=FIX.4.0\n      SocketAcceptPort=9876\n\n      [session]\n      BeginString=FIX.4.1\n      SocketAcceptPort=9877\n\n      [session]\n      BeginString=FIX.4.2\n      SocketAcceptPort=9878\n\n      [session]\n      BeginString=FIX.4.3\n      SocketAcceptPort=9879\n\n      [session]\n      BeginString=FIX.4.4\n      SocketAcceptPort=9880\n\n      [session]\n      BeginString=FIXT.1.1\n      DefaultApplVerID=FIX.5.0SP2\n      SocketAcceptPort=9881\n----\n\n=== QuickFIX/J Server Actuator\n\nTo enable the actuator endpoints you will also have to add the QuickFIX/J Spring Boot Actuator dependency.\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.allune\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-spring-boot-actuator\u003c/artifactId\u003e\n    \u003cversion\u003e3.3.0\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\nEnabling the autoconfiguration of QuickFix/J Server Actuator can be done through a property.\n\n[cols=\"3*\", options=\"header\"]\n|===\n|property\n|example\n|description\n\n|quickfixj.server.actuator.enabled\n|true\n|Enables QuickFix/J Server Actuator autoconfiguration.\n|===\n\nPlease note that the `quickfixj-spring-boot-actuator` dependency will be added automatically by `quickfixj-spring-boot-starter`\n\nAnd enable the QuickFix/J Server endpoint in Spring:\n\n[source,properties]\n----\nmanagement.endpoint.quickfixjserver.enabled=true # whether the endpoint is enabled or not\nmanagement.endpoints.web.exposure.include=quickfixjserver # whether the endpoint will be exposed\n----\n\n[source,yml]\n----\nmanagement:\n  endpoint:\n    health:\n      show-details: always\n    quickfixjserver:\n      enabled: true\n  endpoints:\n    web:\n      exposure:\n        include: quickfixjserver\n----\n\nExample usage:\n\n    http://localhost:8081/actuator/quickfixjserver\n\n[source,json]\n----\n{\n  \"FIX.4.2:EXEC-\u003eBANZAI\": {\n    \"SenderCompID\": \"EXEC\",\n    \"StartTime\": \"00:00:00\",\n    \"DefaultMarketPrice\": \"12.30\",\n    \"ValidOrderTypes\": \"1,2,F\",\n    \"ConnectionType\": \"acceptor\",\n    \"EndTime\": \"00:00:00\",\n    \"BeginString\": \"FIX.4.2\",\n    \"SocketAcceptPort\": \"9878\",\n    \"TargetCompID\": \"BANZAI\",\n    \"SenderCompID\": \"EXEC\",\n    \"HeartBtInt\": \"30\",\n    \"BeginString\": \"FIX.4.2\",\n    \"TargetCompID\": \"BANZAI\",\n    \"FileStorePath\": \"target/data/executor\",\n    \"UseDataDictionary\": \"Y\",\n    \"ProxyPassword\": \"******\"\n  },\n  \"FIX.4.1:EXEC-\u003eBANZAI\": {\n    \"SenderCompID\": \"EXEC\",\n    \"StartTime\": \"00:00:00\",\n    \"DefaultMarketPrice\": \"12.30\",\n    \"ValidOrderTypes\": \"1,2,F\",\n    \"ConnectionType\": \"acceptor\",\n    \"EndTime\": \"00:00:00\",\n    \"BeginString\": \"FIX.4.1\",\n    \"SocketAcceptPort\": \"9877\",\n    \"TargetCompID\": \"BANZAI\",\n    \"SenderCompID\": \"EXEC\",\n    \"HeartBtInt\": \"30\",\n    \"BeginString\": \"FIX.4.1\",\n    \"TargetCompID\": \"BANZAI\",\n    \"FileStorePath\": \"target/data/executor\",\n    \"UseDataDictionary\": \"Y\",\n\t\"JdbcPassword\": \"******\"\n  }\n}\n----\n\n=== QuickFIX/J Server Health Endpoint\n\nThe QuickFIX/J Spring Boot Starter provides with a `HealthIndicator` that checks if the sessions are logged on when they should be (i.e. within market hours) and shows the expected schedule for each session.\nFor example:\n\n[source,json]\n----\n\"quickfixjServerSession\": {\n    \"status\": \"DOWN\",\n    \"details\": {\n        \"FIXT.1.1:BANZAI-\u003eEXEC1\": \"LoggedOn\",\n        \"sessionSchedule\": \"monday, tuesday, wednesday, thursday, friday, saturday, sunday, 04:00:00-UTC - 03:59:59-UTC (monday, tuesday, wednesday, thursday, friday, saturday, sunday, 00:00:00-EDT - 23:59:59-EDT)\",\n        \"FIXT.1.1:BANZAI-\u003eEXEC2\": \"LoggedOff\",\n    }\n}\n----\n\nThe `HealthIndicator` can be enabled in Spring as follows:\n\n[source,properties]\n----\nmanagement.health.quickfixjserver.enabled=true\n----\n\n[source,yml]\n----\nmanagement:\n  health:\n    quickfixjserver:\n      enabled: true\n----\n\n\n== QuickFIX/J Spring Boot Starter - Client (Initiator)\n\n=== Enabling QuickFix/J Client\n\nAdding `quickfixj.client.enabled=true` in your properties file will configure an Initiator with all the default QuickFix/J components:\n\n* A `MessageStoreFactory` of type `MemoryStoreFactory`.\n* A `LogFactory` of type `ScreenLogFactory`.\n* An `Initiator` of type `SocketInitiator`.\n* An `Application` of type `EventPublisherApplicationAdapter`.\n* If quickfixj.client.concurrent.useDefaultExecutorFactory is set to `true`, an `ExecutorFactory` is configured and added to the `Initiator`.\n\nAll these QuickFix/J components can be configured via properties or by overriding the beans.\n\nNote that `@EnableQuickFixJClient` has been deprecated in version `3.0.1`.\n\nFor example:\n\n[source,java]\n----\n@SpringBootApplication\npublic class AppClient {\n\n    public static void main(String[] args) {\n        SpringApplication.run(AppClient.class, args);\n    }\n\n    @Bean\n    public Application clientApplication() {\n        return new ClientApplicationAdapter(); // Provide your own implementation here\n    }\n\n    @Bean\n    public Initiator clientInitiator(\n            Application clientApplication,\n            MessageStoreFactory clientMessageStoreFactory,\n            SessionSettings clientSessionSettings,\n            LogFactory clientLogFactory,\n            MessageFactory clientMessageFactory\n    ) throws ConfigError {\n        return new ThreadedSocketInitiator(clientApplication, clientMessageStoreFactory, clientSessionSettings,\n                clientLogFactory, clientMessageFactory);\n    }\n\n    @Bean\n    public LogFactory clientLogFactory(SessionSettings clientSessionSettings) {\n        return new FileLogFactory(clientSessionSettings);\n    }\n}\n----\n\n=== Configuring the QuickFix/J Client\n\nAdditionally, you need to follow the https://www.quickfixj.org/usermanual/2.3.0/usage/configuration.html[configuration guide]\nto configure the FIX sessions. The configuration is resolved using the following approach:\n\n* By a QuickFIX/J configuration string defined by the `quickfixj.client.configString` property\n* By the presence of a `quickfix.SessionSettings` bean named `clientSessionSettings`\n* By a configuration file defined by the `quickfixj.client.config` property\n* By the presence of the `quickfixj.client.config` system property\n* By a `quickfixj-client.cfg` in the working directory or at the root of the classpath\n\n=== QuickFIX/J Client properties\n\n[cols=\"3*\", options=\"header\"]\n|===\n|Property\n|Example\n|Description\n\n|quickfixj.client.enabled\n|true\n|Whether the QuickFix/J Client is enabled.\n\n|quickfixj.client.config\n|classpath:quickfixj-client.cfg\n|Location of the QuickFix/J configuration file.\n\n|quickfixj.client.configString\n|[default]  \\r\\n\\... (see below for an example)\n|The content of the QuickFIX/J configuration file. This property takes precedence over `quickfixj.client.config`.\n\n|quickfixj.client.auto-startup\n|true\n|Whether to autostart the connection manager at start up (default: `true`).\n\n|quickfixj.client.force-disconnect\n|false\n|Whether logged on sessions should be disconnected forcibly when the connector is stopped (default: `false`).\n\n|quickfixj.client.phase\n|0\n|Phase in which this connection manager should be started and stopped (default: `Integer.MAX_VALUE`).\n\n|quickfixj.client.jmx-enabled\n|true\n|Whether to register the jmx mbeans for the initiator (default: `false`).\n\n|quickfixj.client.message-store-factory\n|memory\n|Type of `MessageStoreFactory` to create. Supported values: `cachedfile`, `file`, `jdbc`, `memory`, `noop`, `sleepycat` (default: `memory`).\n\n|quickfixj.client.log-factory\n|screen\n|Type of `LogFactory` to create. Supported values: `compositelog`, `file`, `jdbc`, `slf4j`, `screen` (default: `screen`).\n\n|quickfixj.client.concurrent.enabled\n|true\n|Whether to use a simple `SocketInitiator` or a `ThreadedSocketInitiator` (default: `false` - uses `SocketInitiator`).\n\n|quickfixj.client.concurrent.useDefaultExecutorFactory\n|true\n|Whether to use a default `ExecutorFactory` to create the `Initiator` (default: `false`).\n\n|quickfixj.client.concurrent.queueCapacity\n|`Integer.MAX_VALUE`\n|When using the default `ExecutorFactory`, the Executor's queue capacity (default: `Integer.MAX_VALUE`).\n\n|quickfixj.client.concurrent.corePoolSize\n|8\n|When using the default `ExecutorFactory`, the Executor's core pool size (default: `8`).\n\n|quickfixj.client.concurrent.maxPoolSize\n|`Integer.MAX_VALUE`\n|When using the default `ExecutorFactory`, the Executor's max pool size (default: `Integer.MAX_VALUE`).\n\n|quickfixj.client.concurrent.allowCoreThreadTimeOut\n|true\n|When using the default `ExecutorFactory`, whether to allow core thread timeout on the Executor (default: `true`).\n\n|quickfixj.client.concurrent.keepAliveSeconds\n|60\n|When using the default ExecutorFactory, the Executor's keep alive in seconds (default: `60`).\n\n|quickfixj.client.concurrent.waitForTasksToCompleteOnShutdown\n|false\n|When using the default ExecutorFactory, whether to wait for tasks to complete on shutdown on the Executor (default: `false`).\n\n|quickfixj.client.concurrent.awaitTerminationSeconds\n|0\n|When using the default ExecutorFactory, the Executor's await termination in seconds (default: `0`).\n\n|quickfixj.client.concurrent.threadNamePrefix\n|QuickFixJ Spring Boot Starter thread-\n|When using the default ExecutorFactory, the Executor's thread name prefix (default: `QuickFixJ Spring Boot Starter thread-`).\n|===\n\nFor example:\n\n[source,properties]\n----\nquickfixj.client.enabled=true\nquickfixj.client.config=classpath:quickfixj-client.cfg\nquickfixj.client.configString=[default]  \\r\\n\\... (see below for an example)\nquickfixj.client.auto-startup=true\nquickfixj.client.phase=0\nquickfixj.client.jmx-enabled=true\nquickfixj.client.message-store-factory=memory\nquickfixj.client.log-factory=screen\n\nquickfixj.client.concurrent.enabled=true\nquickfixj.client.concurrent.useDefaultExecutorFactory=true\nquickfixj.client.concurrent.queueCapacity=Integer.MAX_VALUE\nquickfixj.client.concurrent.corePoolSize=8\nquickfixj.client.concurrent.maxPoolSize=Integer.MAX_VALUE\nquickfixj.client.concurrent.allowCoreThreadTimeOut=true\nquickfixj.client.concurrent.keepAliveSeconds=60\nquickfixj.client.concurrent.waitForTasksToCompleteOnShutdown=false\nquickfixj.client.concurrent.awaitTerminationSeconds=0\nquickfixj.client.concurrent.threadNamePrefix=\"QuickFixJ Spring Boot Starter thread-\"\n----\n\n[source,yml]\n----\nquickfixj:\n  client:\n    enabled: true\n    config: classpath:quickfixj-client.cfg\n    auto-startup: true\n    force-disconnect: false\n    phase: 0\n    jmx-enabled: true\n    concurrent:\n      enabled: true\n      useDefaultExecutorFactory: true\n      queueCapacity: Integer.MAX_VALUE\n      corePoolSize: 8\n      maxPoolSize: Integer.MAX_VALUE\n      allowCoreThreadTimeOut: true\n      keepAliveSeconds: 60\n      waitForTasksToCompleteOnShutdown: false\n      awaitTerminationMillis: 0\n      threadNamePrefix: \"QuickFixJ Spring Boot Starter thread-\"\n    message-store-factory: memory\n    log-factory: screen\n----\n\n=== QuickFIX/J configuration file in properties and yaml files\n\nUsing the `quickfixj.client.configString` property:\n\n[source,properties]\n----\nquickfixj.client.configString=[default] \\r\\n\\\n                              FileStorePath=target/data/banzai \\r\\n\\\n                              ConnectionType=initiator \\r\\n\\\n                              SenderCompID=BANZAI \\r\\n\\\n                              TargetCompID=EXEC \\r\\n\\\n                              SocketConnectHost=localhost \\r\\n\\\n                              StartTime=00:00:00 \\r\\n\\\n                              EndTime=00:00:00 \\r\\n\\\n                              HeartBtInt=30 \\r\\n\\\n                              ReconnectInterval=5 \\r\\n\\\n                              FileLogPath=logs-client \\r\\n\\\n                              \\r\\n\\\n                              [session] \\r\\n\\\n                              BeginString=FIX.4.0 \\r\\n\\\n                              SocketConnectPort=9876 \\r\\n\\\n                              \\r\\n\\\n                              [session] \\r\\n\\\n                              BeginString=FIX.4.1 \\r\\n\\\n                              SocketConnectPort=9877 \\r\\n\\\n                              \\r\\n\\\n                              [session] \\r\\n\\\n                              BeginString=FIX.4.2 \\r\\n\\\n                              SocketConnectPort=9878 \\r\\n\\\n                              \\r\\n\\\n                              [session] \\r\\n\\\n                              BeginString=FIX.4.3 \\r\\n\\\n                              SocketConnectPort=9879 \\r\\n\\\n                              \\r\\n\\\n                              [session] \\r\\n\\\n                              BeginString=FIX.4.4 \\r\\n\\\n                              SocketConnectPort=9880 \\r\\n\\\n                              \\r\\n\\\n                              [session] \\r\\n\\\n                              BeginString=FIXT.1.1 \\r\\n\\\n                              DefaultApplVerID=FIX.5.0SP2 \\r\\n\\\n                              SocketConnectPort=9881\n----\n\n[source,yml]\n----\nquickfixj:\n  client:\n    configString: |\n      [default]\n      FileStorePath=target/data/banzai\n      ConnectionType=initiator\n      SenderCompID=BANZAI\n      TargetCompID=EXEC\n      SocketConnectHost=localhost\n      StartTime=00:00:00\n      EndTime=00:00:00\n      HeartBtInt=30\n      ReconnectInterval=5\n      FileLogPath=logs-client\n\n      [session]\n      BeginString=FIX.4.0\n      SocketConnectPort=9876\n\n      [session]\n      BeginString=FIX.4.1\n      SocketConnectPort=9877\n\n      [session]\n      BeginString=FIX.4.2\n      SocketConnectPort=9878\n\n      [session]\n      BeginString=FIX.4.3\n      SocketConnectPort=9879\n\n      [session]\n      BeginString=FIX.4.4\n      SocketConnectPort=9880\n\n      [session]\n      BeginString=FIXT.1.1\n      DefaultApplVerID=FIX.5.0SP2\n      SocketConnectPort=9881\n----\n\n=== QuickFIX/J Client Actuator\n\nTo enable the actuator endpoints you will also have to add the QuickFIX/J Spring Boot Actuator dependency.\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.allune\u003c/groupId\u003e\n    \u003cartifactId\u003equickfixj-spring-boot-actuator\u003c/artifactId\u003e\n    \u003cversion\u003e3.3.0\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\nEnabling the autoconfiguration of QuickFix/J Client Actuator can be done through a property.\n\n[cols=\"3*\", options=\"header\"]\n|===\n|property\n|example\n|description\n\n|quickfixj.client.actuator.enabled\n|true\n|Enables QuickFix/J Client Actuator autoconfiguration.\n|===\n\nPlease note that the `quickfixj-spring-boot-actuator` dependency will be added automatically by `quickfixj-spring-boot-starter`\n\nAnd enable the QuickFix/J Client endpoint in Spring:\n\n[source,properties]\n----\nmanagement.endpoint.quickfixjclient.enabled=true # whether the endpoint is enabled or not\nmanagement.endpoints.web.exposure.include=quickfixjclient # whether the endpoint will be exposed\n----\n\n[source,yml]\n----\nmanagement:\n  endpoint:\n    health:\n      show-details: always\n    quickfixjclient:\n      enabled: true\n  endpoints:\n    web:\n      exposure:\n        include: quickfixjclient\n----\n\nExample usage:\n\n    http://localhost:8081/actuator/quickfixjclient\n\n[source,json]\n----\n{\n  \"FIXT.1.1:BANZAI-\u003eEXEC\": {\n    \"SenderCompID\": \"BANZAI\",\n    \"StartTime\": \"00:00:00\",\n    \"ConnectionType\": \"initiator\",\n    \"EndTime\": \"00:00:00\",\n    \"BeginString\": \"FIXT.1.1\",\n    \"ReconnectInterval\": \"5\",\n    \"TargetCompID\": \"EXEC\",\n    \"DefaultApplVerID\": \"FIX.5.0\",\n    \"SocketConnectHost\": \"localhost\",\n    \"SenderCompID\": \"BANZAI\",\n    \"HeartBtInt\": \"30\",\n    \"BeginString\": \"FIXT.1.1\",\n    \"TargetCompID\": \"EXEC\",\n    \"FileStorePath\": \"target/data/banzai\",\n    \"SocketConnectPort\": \"9881\",\n    \"ProxyPassword\": \"******\"\n  },\n  \"FIX.4.2:BANZAI-\u003eEXEC\": {\n    \"SenderCompID\": \"BANZAI\",\n    \"StartTime\": \"00:00:00\",\n    \"ConnectionType\": \"initiator\",\n    \"EndTime\": \"00:00:00\",\n    \"BeginString\": \"FIX.4.2\",\n    \"ReconnectInterval\": \"5\",\n    \"TargetCompID\": \"EXEC\",\n    \"SocketConnectHost\": \"localhost\",\n    \"SenderCompID\": \"BANZAI\",\n    \"HeartBtInt\": \"30\",\n    \"BeginString\": \"FIX.4.2\",\n    \"TargetCompID\": \"EXEC\",\n    \"FileStorePath\": \"target/data/banzai\",\n    \"SocketConnectPort\": \"9878\",\n\t\"JdbcPassword\": \"******\"\n  }\n}\n----\n\n=== QuickFIX/J Client Health Endpoint\n\nThe QuickFIX/J Spring Boot Starter provides with a `HealthIndicator` that checks if the sessions are logged on when they should be (i.e. within market hours) and shows the expected schedule for each session.\nFor example:\n\n[source,json]\n----\n\"quickfixjClientSession\": {\n    \"status\": \"DOWN\",\n    \"details\": {\n        \"FIXT.1.1:BANZAI-\u003eEXEC1\": \"LoggedOn\",\n        \"sessionSchedule\": \"monday, tuesday, wednesday, thursday, friday, saturday, sunday, 04:00:00-UTC - 03:59:59-UTC (monday, tuesday, wednesday, thursday, friday, saturday, sunday, 00:00:00-EDT - 23:59:59-EDT)\",\n        \"FIXT.1.1:BANZAI-\u003eEXEC2\": \"LoggedOff\",\n    }\n}\n----\n\nThe `HealthIndicator` can be enabled in Spring as follows:\n\n[source,properties]\n----\nmanagement.health.quickfixjclient.enabled=true\n----\n\n[source,yml]\n----\nmanagement:\n  health:\n    quickfixjclient:\n      enabled: true\n----\n\n== Listening on quickfixj.Application messages\n\nThe QuickFIX/J Spring Boot Starter provides a default implementation for the `quickfixj.Application` interface, the `EventPublisherApplicationAdapter`, which publishes the messages received by the Server (Acceptor) and the Client (Initiator) as `ApplicationEvent`s. The `EventPublisherApplicationAdapter` is provided by default, it's not meant to be used on `high throughput environments`.\n\nIf your application is only processing a subset of message types (i.e. `toAdmin`, `toApp`, `onCreate`, etc.) you will need to register an `EventListener` for these, with the appropriate message type as the only parameter for the listener method:\n\n[source,java]\n----\n@EventListener\npublic void listenFromAdmin(FromAdmin fromAdmin) {\n\t...\n}\n\n@EventListener\npublic void listenFromApp(FromApp fromApp) {\n\t...\n}\n\n@EventListener\npublic void listenOnCreate(Create create) {\n\t...\n}\n\n@EventListener\npublic void listenOnLogon(Logon logon) {\n\t...\n}\n\n@EventListener\npublic void listenOnLogout(Logout logout) {\n\t...\n}\n\n@EventListener\npublic void listenToAdmin(ToAdmin toAdmin) {\n\t...\n}\n\n@EventListener\npublic void listenToApp(ToApp toApp) {\n\t...\n}\n----\n\nIn case the `EventListener` method throws an exception, this exception will be propagated up the `quickfix.Session#next()` method.\nDepending on the value of `RejectMessageOnUnhandledException` in the quickfixj configuration file, the message will be redelivered or dismissed.\n\n== QuickFixJTemplate\n\nThe `QuickFixJTemplate` provides a synchronous client to perform requests, exposing a simple, template method API over the QuickFIX/J client.\n\nThe QuickFIX/J Spring Boot Starter provides a `quickFixJTemplate` bean than can be `Autowired` in the application.\n\n[source,java]\n----\n@Autowire\nprivate QuickFixJTemplate quickFixJTemplate;\n\n...\n\nSessionID sessionID = serverAcceptor.getSessions().stream()\n        .filter(sessId -\u003e\n                sessId.getBeginString().equals(fixVersion) \u0026\u0026\n                        sessId.getTargetCompID().equals(targetId))\n        .findFirst()\n        .orElseThrow(RuntimeException::new);\n\nOrderCancelRequest message = new OrderCancelRequest(\n        new OrigClOrdID(\"123\"),\n        new ClOrdID(\"321\"),\n        new Symbol(\"LNUX\"),\n        new Side(Side.BUY));\n\nquickFixJTemplate.send(message, sessionID);\n\n----\n\n== Examples Projects\nhttps://github.com/esanchezros/quickfixj-spring-boot-starter-examples[quickfixj-spring-boot-starter-examples]\n\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/docker-server-client[QuickFIX/J Spring Boot Server and Client applications as Docker containers]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/docker-server-client-with-failover[QuickFIX/J Spring Boot Server and Client applications as Docker containers with server failover]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/docker-server-client-with-database[QuickFIX/J Spring Boot Server and Client applications as Docker containers with database message store]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-client-and-server[QuickFIX/J Spring Boot Server and Client application]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-client-listener[QuickFIX/J Spring Boot Client application with Event Listeners]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-client-with-database[QuickFIX/J Spring Boot Client application with database message store]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-client[QuickFIX/J Spring Boot Client application]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-server-dynamic-sessions[QuickFIX/J Spring Boot Server application with Dynamic Sessions]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-server-listener[QuickFIX/J Spring Boot Server application with Event Listeners]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-server-with-database[QuickFIX/J Spring Boot Server application with database message store]\n* https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-server[QuickFIX/J Spring Boot Server application]\n\n== License and Acknowledgement\n\nThe QuickFIX/J Spring Boot Starter is released under version 2.0 of the http://www.apache.org/licenses/LICENSE-2.0[Apache License].\n\nThis code includes software developed by http://www.quickfixengine.org/[quickfixengine.org].\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesanchezros%2Fquickfixj-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesanchezros%2Fquickfixj-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesanchezros%2Fquickfixj-spring-boot-starter/lists"}