Skip to content

We incorrectly check for ApplVerID on admin messages #260

@philipwhiuk

Description

@philipwhiuk

Describe the bug

We check for ApplVerID even on session level (admin) messages. We only exclude logon from this.
Per the FIXT.1.1 spec session level messages aren't versioned using the ApplVerID. So we shouldn't check them.

We don't even need the ApplVerID for the session level messages as we then use the session dictionary for validating the message.

To Reproduce

Apply MessageUtils.parse on a logout message.

Expected behavior

We should process the message regardless.

Actual behavior*

We throw an InvalidMessage Exception in MessageUtils.getApplVerID

https://github.com/quickfix-j/quickfixj/blob/master/quickfixj-core/src/main/java/quickfix/MessageUtils.java#L136

https://github.com/quickfix-j/quickfixj/blob/master/quickfixj-core/src/main/java/quickfix/MessageUtils.java#L185

system information:

  • OS: Linux
  • Java version: Java 8
  • QFJ Version: 2.2.0-SNAPSHOT

Additional context

This is commonly seen in the real world in the following scenario:

  1. Logon
  2. Logout with no ApplVerID due to bad sequence numbers with no default set for the session
  3. InvalidMessage thrown

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions