quickfixj icon indicating copy to clipboard operation
quickfixj copied to clipboard

`Session#verify` is misleading

Open philipwhiuk opened this issue 9 months ago • 1 comments

From the name verify you could be excused from thinking that all it does is a form of validation.

Indeed the majority of the message does do this, checking sequence numbers and so-on.

But the last line is to call fromCallback

https://github.com/quickfix-j/quickfixj/blob/974dc7f358b7cdd74ad70e351d18031b66631a0b/quickfixj-core/src/main/java/quickfix/Session.java#L1872

This radically expands the verify method to actually being the point of entry to the Application for FIX traffic.

I can see two options

  1. Rename verify to verifyAndProcessMessage
  2. Move the fromCallback call outside verify and restructuring callers.

philipwhiuk avatar Feb 03 '25 15:02 philipwhiuk

Thanks @philipwhiuk , in my opinion I'd go for option 2. Since these are internal methods it shouldn't be a problem.

chrjohn avatar Feb 08 '25 17:02 chrjohn