Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

Consolidates scattered information about custom message builds from quickfixj-messages/readme.md, customising-quickfixj.md, and orchestration documentation into a single comprehensive guide.

Changes

  • Added BUILD_WITH_CUSTOM_MESSAGES.md - 591-line documentation covering:
    • QuickFIX/J message architecture and module structure
    • When and why to create custom builds (7 scenarios)
    • Available tooling (codegenerator, orchestra plugins, class-pruner)
    • Customization techniques for dictionaries and orchestrations
    • Two implementation approaches: independent project (recommended) vs fork
    • Best practices (avoiding field conflicts, version consistency, licensing)
    • Troubleshooting common issues (class verification, incompatible types, legacy constants)
    • Complete FIX 4.4 example with working Maven configuration

Key Guidance

Independent project approach for custom builds:

<dependency>
    <groupId>org.quickfixj</groupId>
    <artifactId>quickfixj-core</artifactId>
    <version>3.0.0</version>
</dependency>
<dependency>
    <groupId>com.yourcompany</groupId>
    <artifactId>yourapp-fixmessages</artifactId>
    <version>1.0.0</version>
</dependency>

Critical: Custom builds must exclude fields from quickfixj-base to avoid class loader conflicts.

Original prompt

Overview

Create comprehensive documentation that guides users through the process of generating builds with custom messages in QuickFIX/J. This documentation should consolidate information from existing readme files and provide clear, actionable guidance.

Requirements

Create a new documentation file named BUILD_WITH_CUSTOM_MESSAGES.md in the root directory of the repository with the following content:

# Building QuickFIX/J with Custom Messages

## Overview

QuickFIX/J allows you to customize FIX Protocol implementations to suit your organization's specific "Rules of Engagement". This guide explains how to generate a custom build with customized Messages, Components, and Fields without needing to maintain a fork of the entire QuickFIX/J project.

## Table of Contents

- [Understanding QuickFIX/J Message Architecture](#understanding-quickfixj-message-architecture)
- [When to Create a Custom Build](#when-to-create-a-custom-build)
- [Tools for Custom Builds](#tools-for-custom-builds)
- [Customization Techniques](#customization-techniques)
- [Step-by-Step: Creating a Custom Build](#step-by-step-creating-a-custom-build)
- [Best Practices](#best-practices)
- [Troubleshooting](#troubleshooting)

---

## Understanding QuickFIX/J Message Architecture

### Core Concepts

- **QuickFIX/J Core** (`quickfixj-core`) is agnostic to FIX Protocol versions
- Messages and Components are compositions of `quickfix.Field` objects
- The `quickfix.Field` package is common to all FIX protocol versions
- Fields, Components, and Messages are generated from:
  - **QuickFIX Dictionaries** (for FIX 4.0 to FIX 5.0SP2)
  - **FIX Orchestra Repositories** (for FIX Latest and FIXT1.1)

### Module Structure

```
quickfixj-base          → Provides base classes and some standard fields
quickfixj-core          → FIX engine (version-agnostic)
quickfixj-messages      → Generated messages (test dependency only)
  ├── quickfixj-messages-fixt11
  ├── quickfixj-messages-fix50sp2
  ├── quickfixj-messages-fix50sp1
  ├── quickfixj-messages-fix50
  ├── quickfixj-messages-fix44
  ├── quickfixj-messages-fix43
  ├── quickfixj-messages-fix42
  ├── quickfixj-messages-fix41
  └── quickfixj-messages-fix40
```

> **Important**: Message artefacts are **test** dependencies of `quickfixj-core`, not compile or runtime dependencies. This design makes customization easier.

---

## When to Create a Custom Build

Consider creating a custom build when you need to:

1. **Customize Messages, Components, or Fields** for your specific Rules of Engagement
2. **Add User-Defined Fields** not in the standard FIX specification
3. **Modify field requirements** (required vs optional)
4. **Omit unused FIX versions** to reduce distribution size
5. **Use `BigDecimal`** instead of `Double` for decimal types
6. **Resolve incompatibilities** between FIX versions
7. **Maintain legacy constant names** when migrating from QuickFIX/J 2.x

---

## Tools for Custom Builds

The QuickFIX/J project provides several tools for generating custom builds:

### 1. Legacy Code Generator (FIX 4.0 - 5.0SP2)

**Maven Plugin**: `quickfixj-codegenerator`

Generates Field, Component, and Message sources from QuickFIX Dictionary XML files.

```xml
<plugin>
    <groupId>org.quickfixj</groupId>
    <artifactId>quickfixj-codegenerator</artifactId>
    <version>${quickfixj.version}</version>
    <configuration>
        <dictFile>src/main/resources/FIX44.xml</dictFile>
        <outputBaseDirectory>target/generated-sources</outputBaseDirectory>
        <decimal>${generator.decimal}</decimal>
    </configuration>
</plugin>
```

### 2. FIX Orchestra Code Generator (FIX Latest)

**Maven Plugin**: `quickfixj-from-fix-orchestra-code-generator-maven-plugin`

Generates sources directly from FIX Orchestra repositories.

```xml
<plugin>
    <groupId>org.quickfixj.orchestra</groupId>
    <artifactId>quickfixj-from-fix-orchestra-code-generator-maven-plugin</artifactId>
    <version>${quickfixj-orchestra.version}</version>
    <configuration>
        <orchestrationFile>src/main/resources/orchestration.xml</orchestrationFile>
        <generateBigDecimal>false</generateBigDecimal>
        <generateOnlySession>false</generateOnlySession>
        <excludeSession>false</excludeSession>
        <generateFixt11Package>true</generateFixt11Package>
    </configuration>
</plugin>
```

### 3. Dictionary Generator from Orchestra

**Maven Plugin**: `quickfixj-from-fix-orchestra-dictionary-generator-maven-plugin`

Converts FIX Orchestra repositories to QuickFIX-compatible dictionaries.

### 4. Class Pruner

**Maven Plugin**: `class-pruner-maven-plugin`

Deletes generated sources and classes not present in a QuickFIX Dictionary (specialized use).

---

## Customization Techniques

### 1. Edit QuickFIX Dictionaries (FIX 4.0 - 5.0SP2)

Modify the XML dictionary file (e.g., `FIX44.xml`) to:
- Add custom fields
- Define new messages
- Change field requirements (required="Y" or required="N")
- Modify field data types

**E...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/quickfix-j/quickfixj/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: chrjohn <6644028+chrjohn@users.noreply.github.com>
Copilot AI changed the title [WIP] Create documentation for building QuickFIX/J with custom messages Add comprehensive documentation for building QuickFIX/J with custom messages Jan 18, 2026
Copilot AI requested a review from chrjohn January 18, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants