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

Question about publisher dds_suspend() #2116

Open
AngelVI13 opened this issue Oct 25, 2024 · 1 comment
Open

Question about publisher dds_suspend() #2116

AngelVI13 opened this issue Oct 25, 2024 · 1 comment

Comments

@AngelVI13
Copy link

Hello, I just want to ask for information on dds_suspend() and dds_resume() functionality for publishers. Is there any plans for the implementation of these features? I looked at the roadmap but was confused if these are covered by some of the bullet points there. Thank you very much in advance and have a lovely day :)

@eboasson
Copy link
Contributor

Hi @AngelVI13 I had completely forgotten about them 😱 Clearly that means I currently have no plans for it, but it can be done fairly easily. Currently it does support batching via a QoS where you explicitly have to flush the batch when you want to be sure it gets sent. That you can set via dds_qset_writer_batching, which ultimately makes it way to whc_batch, which then controls whether data gets sent immediately or not, at:

if (!wr->whc_batch)
ddsi_xpack_send (wr->m_xp, false);

So changing that whc_batch to an int and letting dds_suspend increment it, dds_resume decrement it and calling ddsi_xpack_send send in dds_resume if whc_batch becomes 0 should do it.

If you feel adventurous, do try! I'd be happy to merge a PR that implements it.

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

2 participants