QoS Questions #5573
Replies: 3 comments 8 replies
-
I got it to work like I intended, but it is much slower. I applied the same durability and history settings to all readers and writers. No samples get lost now. I'm wondering if there is a more performant way of achieving this though. Advice appreciated. |
Beta Was this translation helpful? Give feedback.
-
I thought maybe the issue was that I was not checking for DataWriter->write() returning errors. So I added a loop to retry the write until it returns RETCODE_OK. This had unintended effects. It looks like the server app is repeatedly sending the same sample to the listener app while write() returns an error. That is, the server indefinitely retries the same sample, which is actually being received repeatedly despite the write() return value indicating failure. |
Beta Was this translation helpful? Give feedback.
-
Summary: The lost samples were in fact incomplete retries and I needed to keep the app running. The DataWriter's wait_for_acknowledgments() provides a nice way to do this. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I am writing a simple app which involves two machines using FastDDS to exchange samples. The first machine runs a "driver" and a "listener" process, while the other machine runs a single "server" process.
My code is derived from the HelloWorld example. Here is my code: https://github.com/mechaniputer/LatencyBench-FastDDS
Here is what these processes are supposed to do. The driver should generate samples at regular time intervals and send them on a topic that the server is subscribed to. When the server receives a sample, it should forward the sample by writing it to a second topic which the listener is subscribed to.
In short, it's a round trip test between 2 machines, with one of the machines intentionally bottlenecked by using a single process while the other machine splits sending and receiving between two processes via separate topics.
Here is the problem I am having. Even though I am using a reliable QoS, the listener only receives about half of the samples that the driver sent. Is the QoS set up wrong?
Edit: An update. I changed the writers in both the "driver" and the "server" app to use KEEP_ALL_HISTORY_QOS. It runs for a few seconds and then the driver slows down drastically while the server seems to stop receiving any samples and times out.
Beta Was this translation helpful? Give feedback.
All reactions