Add send_buffer_queue param so bridge respects QoS rather than dropping messages #339
+43
−11
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.
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 thesend_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 thesend_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.