Skip to content

DX Issue: Generated Message class name collides with quickfix.Message, causing confusion #1335

Open

Description

@dpetillo

Code gen creates a class called Message for generated FIX messages. Core API already has quickfix.Message. Same simple name, different classes and no type relationship while being functionally adjacent.

This is confusing. Easy to import the wrong one, easy to mix them up when reading code. Found it unclear to developers the quickfix.Message is even available, while it being a powerful tool.

Suggest renaming the generated class to something more specific, e.g. MessageBase, GeneratedMessage.

Activity

  1. added theissue type on Sep 26, 2026
  2. chrjohn commented on Sep 27, 2026

    @chrjohn
    Member

    Hmm, don't know how other users see this, but personally I usually develop against specific types of messages, e.g. fix44.ExecutionReport, and almost never use the general message.

  3. changed the title [-]DX Issue: Generated Message class name collides with quickfix.Message, causing confusion[/-] [+]DX Issue: Generated Message class name collides with `quickfix.Message`, causing confusion[/+] on Sep 27, 2026
  4. dpetillo commented on Sep 28, 2026

    @dpetillo
    Author

    If you are coding a QuickFixJ Application, thats a file that would import the top quickfixj package. You would also import the package with generated types. So I'd think many would ges into the situation where these two Message type names are colliding.

    import quickfix.*;
    import quickfix.fix44.*;
    
    public class MyApp extends ApplicationAdapter {
    
        // Compile error: reference to Message is ambiguous
        public void fromApp(Message message, SessionID sessionId) {
    
            // Explicit use of the generated one needs full qualification
            quickfix.fix44.Message m44 = (quickfix.fix44.Message) message;
        }
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions