Skip to content

Conversation

@the-thing
Copy link
Contributor

@the-thing the-thing commented Sep 24, 2025

newHeader() and getHeader() methods will be generated in the Message class. This will help keeping consitent header behavior across all fix versions.

See

The new classes will look like this.

/* Generated Java Source File */
package quickfix.fixlatest;
import quickfix.field.*;

public class Message extends quickfix.Message {
  static final long serialVersionUID = 552892318L;

  public Message() {
    this(null);
  }
  protected Message(int[] fieldOrder) {
    super(fieldOrder);
    header = new Header(this);
    trailer = new Trailer();
    getHeader().setField(new BeginString("FIXT.1.1"));
  }

  @Override
  protected Header newHeader() {
    return new Header(this);
  }

  @Override
  public Header getHeader() {
    return (Message.Header)header;
  }

public static class Header extends quickfix.Message.Header {
  static final long serialVersionUID = 552892318L;

  public Header(Message msg) {

  }
}
}

@chrjohn
Copy link
Member

chrjohn commented Sep 24, 2025

@the-thing great, thanks for pursuing this.

@chrjohn chrjohn changed the title Generate header related methods in Message class. Generate header related methods in Message class. Sep 25, 2025
@chrjohn
Copy link
Member

chrjohn commented Sep 25, 2025

I'll need to build a release once this is merged so you can continue with this on quickfix-j/quickfixj#1048 . I'll keep you posted.

@the-thing
Copy link
Contributor Author

No rush.

I will not be able to continue since this is the only thing left. I mean once this is merged and released I will have to update the dependency as part of quickfix-j/quickfixj#1048 and I will modify a test case to include class names for FIXT and FIX latest. I believe this is the only thing left.

@chrjohn chrjohn added this to the 1.0.2 milestone Sep 26, 2025
@chrjohn chrjohn merged commit e6a7972 into quickfix-j:master Sep 29, 2025
11 checks passed
@the-thing the-thing deleted the message-class-header-fields branch September 29, 2025 07:54
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