You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think if two-point is all reliable, DataWriter should waiting for DataReader consume (on_data_available function end) before send next message even though without ResourceLimits. Is that right?
If resource limits is reached, DataWriter should wait for enabled then send next message, it shouldn't send so many messages before dataReader enable.
Operate Step:
Publisher and subscriber run in the same machine.
//publisher.cppintmain(int argc, char **argv) {
dds::domain::DomainParticipant participant(13);
dds::topic::Topic<HelloWorldData::Msg> topic(participant, "topic");
dds::pub::Publisher publisher(participant);
auto qos = publisher.default_datawriter_qos();
qos->policy(dds::core::policy::Reliability::Reliable(dds::core::Duration::from_secs(20)));
qos->policy(dds::core::policy::History::KeepAll());
qos->policy(dds::core::policy::Durability::TransientLocal());
auto limits = dds::core::policy::ResourceLimits();
limits.max_samples(1);
qos->policy(limits);
dds::pub::DataWriter<HelloWorldData::Msg> writer(publisher, topic, qos);
std::cout << "=== [Publisher] Waiting for subscriber." << std::endl;
while (writer.publication_matched_status().current_count() == 0) {
std::this_thread::sleep_for(std::chrono::milliseconds(20));
}
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
int i = 0;
HelloWorldData::Msg msg(0, "Hello World");
while(true) {
msg.userID(i++);
writer.write(msg);
std::cout << "=== [Publisher] Write " << i << std::endl;
}
}
Subscriber should receive all messages from publisher.
DataWriter should wait DataReader consume all samples then send next message.
Now
Subscriber receive all messages until publisher crash.(√)
DataWriter send 442 messages before DataReader read any sample, then crash by Write Timeout after max_blocking_time.(×)
Question
I think if two-point is all reliable, DataWriter should waiting for DataReader consume (on_data_available function end) before send next message even though without ResourceLimits. Is that right?
If resource limits is reached, DataWriter should wait for enabled then send next message, it shouldn't send so many messages before dataReader enable.
The text was updated successfully, but these errors were encountered:
OK, I found there is a c api in cyclone called dds_wait_for_acks.
So if there is a plan to support wait_for_acknowledgments in org::eclipse::cyclonedds::pub::AnyDataWriterDelegate? Now it is:
voidAnyDataWriterDelegate::wait_for_acknowledgments(
const dds::core::Duration& timeout)
{
ISOCPP_THROW_EXCEPTION(ISOCPP_UNSUPPORTED_ERROR, "Function not currently supported");
(void)timeout;
}
Question
Operate Step:
Publisher and subscriber run in the same machine.
Expect:
Now
DataWriter
send 442 messages beforeDataReader
read any sample, then crash byWrite Timeout
aftermax_blocking_time
.(×)Question
DataWriter
should waiting forDataReader
consume (on_data_available
function end) before send next message even though withoutResourceLimits
. Is that right?DataWriter
should wait for enabled then send next message, it shouldn't send so many messages before dataReader enable.The text was updated successfully, but these errors were encountered: