Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log warning on unexpected conflation in stream #582

Open
agberk opened this issue Aug 25, 2024 · 1 comment
Open

Log warning on unexpected conflation in stream #582

agberk opened this issue Aug 25, 2024 · 1 comment

Comments

@agberk
Copy link
Contributor

agberk commented Aug 25, 2024

From https://betfair-developer-docs.atlassian.net/wiki/spaces/1smk3cen4v3lu3yomq5qye0ni/pages/2687396/Exchange+Stream+API:

Conflation

Conflation set to true (con=true) in the stream message means that multiple stream updates have been pushed in the same cycle.

This can happen due to the following reasons:

The client socket buffer for the connection needs to be read (cleared) by the client in order for the Stream API to push the next cycle, if not the current update is skipped, and pushed with the next cycle resulting in "con = true".

The client subscription message has the "conflateMs" parameter set to a value greater than '0'.

The Stream API has a slow publishing cycle resulting in multiple updates being pushed in the same message.

I'd like to be able to identify the cases where either the client isn't reading faster enough or the Stream API has a slow publishing cycle.

It's been a while since I've looked at the code but it seemed like the most sensible approach was to modify the BaseStream.on_update method, check whether con has been set to True and log a warning if the conflateMs we asked for is not >0, similar to how the max latency check and warning log statement is being done.

@agberk
Copy link
Contributor Author

agberk commented Aug 25, 2024

PR: #583

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

No branches or pull requests

1 participant