-
Notifications
You must be signed in to change notification settings - Fork 67
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 ability to confirm reader receive all sent messages #295
Comments
Do you have any comments on adding this interface ? |
@Barry-Xu-2018 can you summarize the motivation of adding this? i.e.: give some example use cases. Is this standard DDS API? |
I believe the motivation is so that rosbag2 playback can finish sending any reliable messages before shutting itself down, rather than immediately shutting down after calling the final This API could possibly be overkill, though, as I believe currently FastDDS hasn't even had the chance to publish the message at the time of shutdown due to happening in a separate worker thread. I'm not familiar enough with the DDS APIs to say whether "all messages sent once" is a feature we could connect to, as that is probably closer to the desired behavior: "if I call publish, give me the opportunity to determine whether the message was actually published, before I shut down" |
As @emersonknapp said, motivation is
This API can provide an ability to make sure all subscribers receive all sent messages from the publisher (Only if QOS profile of publisher is set to RELIABLE).
Yes. You can find the section |
I'm not sure what this means, do you mean that I think that in a reliable publisher, having a way to wait until all sent messages are actually sent is a good idea, but I'm not sure if |
Checking the DDS spec, it seems that it means exactly that: This operation blocks the calling thread until either all data written by the reliable DataWriter entities is acknowledged by all
matched reliable DataReader entities, or else the duration specified by the max_wait parameter elapses, whichever happens
first. A return value of OK indicates that all the samples written have been acknowledged by all reliable matched data readers;
a return value of TIMEOUT indicates that max_wait elapsed before all the data was acknowledged. so I second the proposal if somebody else also approves. |
What I'm trying to convey is -
|
Thanks for clarifying @emersonknapp, the proposal sounds good to me.
I really don't see the point of the less strict version, so I like what DDS provides in this case. |
i believe that
|
@fujitatomoya thanks, I got that from @emersonknapp comment. IIUC things like |
About this new interface, what do you think ? |
Thanks for bringing attention to this in the middleware workgroup meeting. I have a couple of questions to clarify the idea.
|
I am not sure if DataWriter can latch the peer matched DataReader. but this race condition always there, so my understanding is even if the QoS is reliable, the process (in this case from previous WG discussion, we can see a few options to provide for rosbag2 case.
i may be missing something, please correct me if i got anything wrong ❗ aside from rosbag2, i believe there would be some use cases to call |
Please help to review rmw implementation. |
Now all implementations have been done and under review.
|
@Barry-Xu-2018 thanks 👍 as we talked offline before, we can probably call this it would be better to discuss on ros2/rosbag2#571 with @emersonknapp @Karsten1987 |
It's a decision in rosbag, but I think |
i will close this issue since related system interfaces and APIs are merged in mainline. |
Feature request
Feature description
Developer can use this interface to confirm reader receive all sent messages. For some use cases, this confirmation is very important.
wait_for_acknowledgments
is defined in DDS spec.The description in DDS spec
Implementation considerations
If DDS exposes this interface, we can directly use (Such as FastDDS). If not, return unsupported.
The text was updated successfully, but these errors were encountered: