How esanchezros/quickfixj-spring-boot-starter works
Main Components
• Modules: Based on the file tree, you have several key modules:
• quickfixj-spring-boot-starter (the primary entry point for users)
• quickfixj-spring-boot-actuator (provides actuator endpoints for health and monitoring)
• quickfixj-spring-boot-autoconfigure (contains the auto-configuration logic for QuickFIX/J)
• quickfixj-spring-boot-context (manages the common Spring context, bean definitions, and exception models)
• QuickFIX/J Connectors:
• Server (Acceptor): Provides components like MessageStoreFactory, LogFactory, and the Acceptor itself.
• Client (Initiator): Similarly sets up its specific MessageStoreFactory, LogFactory, and Initiator.
• Supporting Components:
• QuickFixJTemplate: A synchronous template to send messages.
• EventPublisherApplicationAdapter: A default Application implementation that publishes messages as Spring ApplicationEvents.
• Health Indicators and Actuator Endpoints for server and client diagnostics.
• Configuration Elements:
• External configuration via properties/yaml or configuration files (see quickfixj.server.configString, quickfixj.client.configString, etc.)
• Beans that provide the underlying QuickFIX/J components.
Relationships and Interactions
• The Spring Boot Application serves as the container for the entire configuration.
• The autoconfiguration module detects and creates default beans for QuickFIX/J components (either server/acceptor or client/initiator) based on provided properties.
• The context module holds shared beans and common exception handling.
• The actuator module integrates with Spring Boot’s management endpoints so that QuickFIX/J’s status and health are exposed (for example, the endpoints: /actuator/quickfixjserver and /actuator/quickfixjclient).
• The QuickFixJTemplate is “wired” via dependency injection into any clients that need to send messages.
• Optional separate Spring contexts can be used when the application requires multiple QuickFIX/J instances (as shown in the README sample for combining clients and servers in a parent/child context).
Architectural Patterns and Design Principles
• Auto-configuration and “starter” mechanism: Uses Spring Boot auto-configuration to provide defaults that can be overridden.
• Modular architecture: The project is divided into modules that separate concerns (e.g., configuration, actuator endpoints, core context, etc.).
• Template pattern: The QuickFixJTemplate abstracts common operations to simplify sending messages.
• Event-driven design: The default Application implementation publishes FIX messages as events for other components to consume.
• Spring’s dependency injection is used throughout to simplify customization and extension.
Relevant Technologies and Frameworks
• Spring Boot (including Spring’s dependency injection and actuator subsystem)
• QuickFIX/J (for the FIX protocol messaging functionality)
• Maven (as the build and dependency management tool)
• Optional components such as JMX (for monitoring) are also integrated via actuator endpoints