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

Add send_buffer_queue param so bridge respects QoS rather than dropping messages #339

Conversation

MrBlenny
Copy link
Contributor

@MrBlenny MrBlenny commented Feb 20, 2025

By default, when the send_buffer_limit is reached, messages will be thrown out.

This PR adds the option the queue messages instead of dropping them when the send_buffer_limit is reached. This achieved by changing each Channel's subscription callback group to be Mutually Exclusive and then blocking the callback until the Websocket's TCP buffer is less than the send_buffer_limit.

By blocking the callback, we are able to make the bridge respect the ROS QoS.

Edit - on further consideration... Blocking the thread is not so good. I'll investigate to see if this can be acheived with some combination of Mutally Exclusive callbacks groups / timers.

@MrBlenny MrBlenny changed the title feat: add send_buffer_queue param Add send_buffer_queue param so bridge respects QoS rather than dropping Messages Feb 20, 2025
@MrBlenny MrBlenny changed the title Add send_buffer_queue param so bridge respects QoS rather than dropping Messages Add send_buffer_queue param so bridge respects QoS rather than dropping messages Feb 20, 2025
@MrBlenny MrBlenny marked this pull request as draft February 20, 2025 06:41
@MrBlenny MrBlenny closed this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant