Repository navigation
Make Initiator`s inbound channel buffered (#22) - #732
Closed
AlexandrosKyriakakis wants to merge 3 commits into
Closed
AlexandrosKyriakakis wants to merge 3 commits into
AlexandrosKyriakakis wants to merge 3 commits into
Conversation
We have observed slow consumption of FIX messages in the Initiator. Since the outbound channel is buffered, the event loop is sending too many messages at once but reads incoming messages one by one. This creates an inconsistency between incoming consumption messages and outgoing production messages. In this PR we resolve this issue by making the inbound channel buffered. So the Initiator can now read and write in a truly asynchronous way. This change is feature flagged. Can be used by setting `InitiatorInChanCapacity` with an integer representing the capacity of the inbound channel to the session settings config.
michaelwilner
requested changes
Oct 21, 2025
| // note: Here we don't use "github.com/alpacahq/quickfix/config" to set the config "InitiatorInChanCapacity" | ||
| // because we currently use "github.com/quickfixgo/quickfix/config" for the configs so it will break the dependencies | ||
| // either way, the config can be passed through the SessionSettings map | ||
| const initiatorInChanCapacityConfig = "InitiatorInChanCapacity" |
Contributor
There was a problem hiding this comment.
Can this be added to the acceptor as well? I think this is overall a good change, although I'd prefer this particular config in config/configuration.go and match comment style in there
Contributor
There was a problem hiding this comment.
In addition, should this be added to the acceptor, config should likely be named InChanCapacity instead
Contributor
|
Hey @AlexandrosKyriakakis I cherry-picked your commit, resolved merge conflicts, and extended it to the acceptor side as well. Also validated against our internal system’s test suite. Thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have observed slow consumption of FIX messages in the Initiator.
Since the outbound channel is buffered, the event loop is sending too many messages at once but reads incoming messages one by one. This creates an inconsistency between incoming consumption messages and outgoing production messages.
In this PR we resolve this issue by making the inbound channel buffered. So the Initiator can now read and write in a truly asynchronous way.
This change is feature flagged. Can be used by setting
InitiatorInChanCapacitywith an integer representing the capacity of the inbound channel to the session settings config.