Skip to content

Commit b8c9574

Browse files
authored
Merge branch 'master' into nonstopsession-log-fix
2 parents 9dc0faf + 0b8e1db commit b8c9574

File tree

299 files changed

+23717
-3466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+23717
-3466
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ updates:
77
directory: "/" # Location of package manifests
88
schedule:
99
interval: "daily"
10+
open-pull-requests-limit: 10
1011
- package-ecosystem: "github-actions"
1112
directory: "/"
1213
schedule:
1314
# Check for updates to GitHub Actions every weekday
1415
interval: "daily"
16+
open-pull-requests-limit: 10

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737

3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@v3
40+
uses: actions/checkout@v4
4141

4242
# Initializes the CodeQL tools for scanning.
4343
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@v2
44+
uses: github/codeql-action/init@v3
4545
with:
4646
languages: ${{ matrix.language }}
4747
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -51,19 +51,18 @@ jobs:
5151

5252
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5353
# If this step fails, then you should remove it and run the build manually (see below)
54-
- name: Autobuild
55-
uses: github/codeql-action/autobuild@v2
54+
#- name: Autobuild
55+
# env:
56+
# uses: github/codeql-action/autobuild@v2
5657

5758
# ℹ️ Command-line programs to run using the OS shell.
5859
# 📚 https://git.io/JvXDl
5960

6061
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
6162
# and modify them (or add more) to build your code if your project
6263
# uses a compiled language
63-
64-
#- run: |
65-
# make bootstrap
66-
# make release
64+
- run: |
65+
./mvnw clean package -B -V -e -Pminimal-fix-latest -Dmaven.javadoc.skip=true -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Dspotbugs.skip -Denforcer.skip -DskipTests -Dmaven.test.skip.exec -Dlicense.skip=true -Drat.skip=true -Dspotless.check.skip=true -D"java.util.logging.config.file"="logging.properties" -D"http.keepAlive"="false" -D"maven.wagon.http.pool"="false" -D"maven.wagon.httpconnectionManager.ttlSeconds"="120"
6766
6867
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@v2
68+
uses: github/codeql-action/analyze@v3

.github/workflows/maven.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,46 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [ubuntu-latest, macOS-latest, windows-latest]
16+
os: [ubuntu-latest, macOS-latest]
1717
java: [8, 11, 17]
1818
fail-fast: false
1919
max-parallel: 4
2020
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- name: Set up JDK
25-
uses: actions/setup-java@v3
25+
uses: actions/setup-java@v4
2626
with:
2727
distribution: 'temurin'
2828
java-version: ${{ matrix.java }}
29+
cache: 'maven'
2930
- name: Test with Maven
30-
env:
31-
MAVEN_OPTS: "-Xms3g -Xmx3g"
32-
run: mvn test -B -V -D"java.util.logging.config.file"="logging.properties" -D"http.keepAlive"="false" -D"maven.wagon.http.pool"="false" -D"maven.wagon.httpconnectionManager.ttlSeconds"="120"
31+
run: ./mvnw install -B -V -Pminimal-fix-latest -D"java.util.logging.config.file"="logging.properties" -D"http.keepAlive"="false" -D"maven.wagon.http.pool"="false" -D"maven.wagon.httpconnectionManager.ttlSeconds"="120"
32+
33+
test-windows:
34+
runs-on: ${{ matrix.os }}
35+
strategy:
36+
matrix:
37+
os: [windows-latest]
38+
java: [8, 11, 17]
39+
fail-fast: false
40+
max-parallel: 3
41+
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Configure pagefile
46+
uses: al-cheb/configure-pagefile-action@v1.3
47+
with:
48+
minimum-size: 8GB
49+
maximum-size: 16GB
50+
disk-root: "C:"
51+
- name: Set up Windows JDK
52+
uses: actions/setup-java@v4
53+
with:
54+
distribution: 'temurin'
55+
java-version: ${{ matrix.java }}
56+
cache: 'maven'
57+
- name: Test with Maven on Windows
58+
run: ./mvnw.cmd install -B -V -D"maven.javadoc.skip"="true" -P"skipBundlePlugin,minimal-fix-latest" -D"java.util.logging.config.file"="logging.properties" -D"http.keepAlive"="false" -D"maven.wagon.http.pool"="false" -D"maven.wagon.httpconnectionManager.ttlSeconds"="120"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ target/
1111
*.iws
1212
# ignore NetBeans configuration
1313
nb-configuration.xml
14+
*.bak

.mvn/jvm.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Xms3g -Xmx6g -Djdk.xml.xpathExprGrpLimit=500 -Djdk.xml.xpathExprOpLimit=500

.mvn/wrapper/maven-wrapper.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

README.md

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ QuickFIX/J
77
This is the official QuickFIX/J project repository.
88

99
## intro
10-
QuickFIX/J is a full featured messaging engine for the FIX protocol (FIX versions 4.0 - 5.0SP2/FIXT1.1).
10+
QuickFIX/J is a full featured messaging engine for the FIX protocol (FIX versions 4.0 - 5.0SP2/FIXT1.1 and FIXLatest).
1111
It is a 100% Java open source implementation of the popular C++ QuickFIX engine.
1212

1313
The Financial Information eXchange (FIX) protocol is a messaging standard developed
@@ -42,27 +42,27 @@ Pull requests are always welcome! Best is if you added a unit test to show that
4242

4343
Fastest: clone the repo and issue the following command.
4444
```
45-
$ mvn clean package -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin
45+
$ mvnw clean package -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin,minimal-fix-latest
4646
```
4747

4848
Slower: if you only want to skip the acceptance test suite:
4949
```
50-
$ mvn clean package -Dmaven.javadoc.skip=true -DskipAT=true -PskipBundlePlugin
50+
$ mvnw clean package -Dmaven.javadoc.skip=true -DskipAT=true -PskipBundlePlugin,minimal-fix-latest
5151
```
5252

5353
Slow: if you want to run all tests:
5454
```
55-
$ mvn clean package -Dmaven.javadoc.skip=true -PskipBundlePlugin
55+
$ mvnw clean package -Dmaven.javadoc.skip=true -PskipBundlePlugin,minimal-fix-latest
5656
```
5757
NB: If you want to use the resulting JARs in an OSGi environment you'll have to omit the `-PskipBundlePlugin` option.
5858

5959
## importing the project into the IDE
6060

6161
When the project is first created, it will not have the generated message classes and compile errors will occur! Best is to compile once on the command line before importing the project into the IDE.
6262

63-
If the IDE reports some errors after the compilation with `mvn clean package`, try to use `mvn clean install`, like:
63+
If the IDE reports some errors after the compilation with `mvnw clean package`, try to use `mvnw clean install`, like:
6464
```
65-
$ mvn clean install -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin
65+
$ mvnw clean install -Dmaven.javadoc.skip=true -DskipTests -PskipBundlePlugin,minimal-fix-latest
6666
```
6767

6868
## configuration options
@@ -283,3 +283,40 @@ void sendOrderCancelRequest() throws SessionNotFound {
283283
Session.sendToTarget(message, "TW", "TARGET");
284284
}
285285
```
286+
287+
## QuickFIX/J Runtime
288+
289+
This project builds artefacts for the standard published FIX specification versions from FIX 4.0 to FIX Latest.
290+
291+
* ```quickfixj-messages-fix40```
292+
* ```quickfixj-messages-fix41```
293+
* ```quickfixj-messages-fix42```
294+
* ```quickfixj-messages-fix43```
295+
* ```quickfixj-messages-fix44```
296+
* ```quickfixj-messages-fix50```
297+
* ```quickfixj-messages-fix50sp1```
298+
* ```quickfixj-messages-fix50sp2```
299+
* ```quickfixj-messages-fixlatest```
300+
* ```quickfixj-messages-fixt11```
301+
* ```quickfixj-messages-all``` - includes all of the above
302+
303+
These artefacts are <u>**test**</u> dependencies of ```quickfixj-core```. They are **not** specified as _runtime_ dependencies, this makes it easier to customise QuickFIX/J deployments.
304+
305+
If you have no need to customise a FIX integration then you can use the ```org.quickfixj``` artefacts built by this project. Simply include them as dependencies of your application.
306+
307+
Artefacts for unused FIX specification versions can be omitted from your runtime.
308+
Many integrations will not require ```quickfixj-messages-all``` and need only depend on artefacts for a subset of the FIX standard versions. Please note that FIX Protocol versions 5.0 and later depend on ```quickfixj-messages-fixt11``` which provides the implementation for the FIXT1.1 transport messages.
309+
310+
Many integrations require specialisation of the FIX Messages, Components and/or Fields. This is accomplished by building and using custom artefacts. Please see [Customising QuickFIX/J](./customising-quickfixj.md) for more detail.
311+
312+
### Application Dependencies for QuickFIX/J Messages Build
313+
314+
![image info](./src/main/puml/dependencies_fixt11_fixlatest.png)
315+
316+
![image info](./src/main/puml/dependencies_qfj_all.png)
317+
318+
### Application Dependencies for Custom Messages Build
319+
320+
![image info](./src/main/puml/custom_dependencies.png)
321+
322+
![image info](./src/main/puml/custom_dependencies_fixt11_fixlatest.png)

customising-quickfixj.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
2+
# Customising QuickFIX/J
3+
4+
The core QuickFIX/J module is agnostic to FIX Protocol Versions. At runtime a QuickFIX/J dictionary with supporting implementation packages is required to use type-safe classes.
5+
6+
The specification for a FIX integration is called a "Rules of Engagement". The Rules of Engagement can be customised with the mutual agreement of the respective counter-parties.
7+
8+
The message, component and field implementations can be provided by a specialised build, along with the corresponding QuickFIX/J dictionary for the custom Rules of Engagement.
9+
10+
The standard distribution of ```quickfixj-core``` can be used with custom artefacts. You need only build artefacts for versions of the Protocol that you use. These can be maintained independently from the QuickFIX/J project, while depending on the QuickFIX/J for the core functionality and tools.
11+
12+
To build custom artefacts it's helpful to understand how QuickFIX/J builds the Field, Component and Message classes from the QuickFIX/J dictionaries and from [FIX Orchestra](https://www.fixtrading.org/standards/fix-orchestra/).
13+
14+
The QuickFIX/J reference implementations for FIX versions FIX4.0 to FIX5.0sp2 and for FIXT1.1 are generated from the QuickFIX dictionaries for the specific version. The dictionaries are located in the ```src/main/resources``` directory of the respective modules of the ```quickfixj-messages``` module.
15+
Maintaining the FIX4.0 to FIX5.0sp2 builds intentionally provides consistency with the prior QuickFIX/J 2 release in order to ease migration to QuickFIX/J 3.
16+
17+
The most recent standard is defined as [FIX Latest](https://www.fixtrading.org/online-specification/). The QuickFIX/J reference implementation for FIX Latest is generated from a [FIX Orchestra](https://www.fixtrading.org/standards/fix-orchestra/) repository file.
18+
An implementation or customisation of the FIX Standars derived from the FIX Orchestra repository is known as an "_orchestration_".
19+
The standard FIX Orchestra repository requires some modification to work well with QuickFIX/J.
20+
This is done by the ```quickfixj-orchestration``` module.
21+
The ```quickfixj-orchestration``` module publishes a modified Orchestra artefact which can then be the basis of a custom FIX Latest build using QuickFIX/J .
22+
23+
The complete reference FIX Latest specification results in a very large distribution.
24+
To use FIX Latest, customisation of the [FIX Orchestra](https://www.fixtrading.org/standards/fix-orchestra/) repository is advisable.
25+
Please see [QuickFIX/J Orchestration](./quickfixj-orchestration/readme.md) for details.
26+
27+
## Customisation Scenarios
28+
29+
### **Enable the use of ```BigDecimal``` for FIX Decimal Data Types**
30+
31+
This behaviour is controlled by the ```${generator.decimal}``` build property. It is "false" by default to avoid surprising side effects of incompatible data types.
32+
33+
To enable the use of ```BigDecimal``` in code generation, set the ```${generator.decimal}``` property to "true" in [quickfixj-messages](./quickfixj-messages/readme.md) and build the message artefacts.
34+
35+
```
36+
<properties>
37+
<generator.decimal>true</generator.decimal>
38+
</properties>
39+
```
40+
See [QuickFIX/J Messages](./quickfixj-messages/readme.md) for details of the build and recommendation for **how to implement custom builds.**
41+
42+
### **Incompatible Data Types**
43+
44+
Some incompatible changes have occurred in the evolution of the FIX protocol. For example see below changes to the type of **OrderQty (38)** :
45+
46+
|FIX Version|Field Name|FIX Datatype|Base Type|QuickFIX/J Datatype|
47+
|---|---|---|---|---|
48+
|4.0|OrderQty|int|int|```int```|
49+
|4.2|OrderQty|Qty|float|```Double``` or ```BigDecimal```|
50+
51+
Only one ```quickfix.Field``` class with the same name may be loaded by the Java classloader so only one version of this Field should be in the classpath. QuickFix/J also verifies the data type using the supplied QuickFIX "Dictionary".
52+
53+
Code generation using ```BigDecimal``` is incompatible at runtime with ```int``` for **OrderQty**. In this case, ```double``` is compatible with ```int``` at run time due to [widening primitive conversion](http://titanium.cs.berkeley.edu/doc/java-langspec-1.0/5.doc.html).
54+
55+
Runtime incompatibilities can be resolved by:
56+
* Amending the QuickFIX Dictionary to coerce the code generation and/or validation
57+
* Changing the ordering of code generation and/or overwrite behaviour of code generation
58+
* Omitting incompatible versions from your customised build
59+
* Building artefacts independently for the conflicting versions and ensuring they are not used them in the same runtime
60+
61+
See [QuickFIX/J Messages](./quickfixj-messages/readme.md) for details of the build and recommendation for **how to implement custom builds.**
62+
63+
### **Customising the FIX Protocol for specialised Rules of Engagement**
64+
65+
A Rules of Engagement can include customisation Messages, Components and Fields, including User Defined elements.
66+
67+
It is not necessary to maintain a fork of the entire QuickFIX/J project to provide customised QuickFIX Dictionaries and to
68+
generate type-safe libraries that are interoperable with QuickFIX/J.
69+
70+
[FIX Orchestra](https://www.fixtrading.org/standards/fix-orchestra/) is intended for customisation to produce machine-readable Rules of Engagement.
71+
72+
Consider creating a new project (or projects) to build the Messages, Components and Fields as needed for your specific Rules of Engagement.
73+
74+
Edit the QuickFIX Dictionary or FIX Orchestra Repository (Orchestration) as required and
75+
build the Messages, Components and Fields packages using the tools provided by the QuickFIX/J projects.
76+
77+
QuickFIX/J Dictionaries, FIX Orchestra Orchestrations and/or documents can also be generated.
78+
79+
See [QuickFIX/J Messages](./quickfixj-messages/readme.md) for details of the build and recommendation for **how to implement custom builds.**
80+
81+
### **Managing incompatibility with Prior Versions of QuickFIX/J**
82+
83+
From QuickFIX/J 3.0.0 the code generation for ```quickfix.Field``` prefers the FIX Orchestra Standard. This results in incompatible changes to the names of constants.
84+
85+
For example : ```SettlType.REGULAR_FX_SPOT_SETTLEMENT``` becomes ```SettlType.REGULAR```.
86+
87+
The required code changes may be trivial in most cases, but changes are elective.
88+
The following describes how to use ```quickfixj-core``` from QuickFIX/J 3 without needing to implement code changes:
89+
* build the required Message artefacts without the FIX Latest code generation. The Fields will then be generated only from legacy FIX Protocol Versions as they were prior to QuickFIX/J 3.0.0 - **or**
90+
* if you want to use Messages, Components and/or Fields from FIX Latest while preferring legacy constants,
91+
manipulate the order of code generation and/or the over-write behaviour of code behaviour to prefer earlier versions of FIX.
92+
For example, generate FIX Latest first and overwrite the generated Field classes by subsequently running code generation for an earlier version.
93+
94+
See [QuickFIX/J Messages](./quickfixj-messages/readme.md) for details of the build and recommendation for **how to implement custom builds.**

0 commit comments

Comments
 (0)