Jump to content
OpenSplice DDS Forum

Stop receiving messages if set DestinationOrder::SourceTimestamp() for topic

Recommended Posts

I want to receive messages in the order they were published. So I added dds::core::policy::DestinationOrder::SourceTimestamp() to my topic qos. Now I can't receive any message. What I am doing wrong? There are no errors in log files.

        dds::domain::DomainParticipant dp(org::opensplice::domain::default_id());

        dds::topic::qos::TopicQos topicQosCommand = dp.default_topic_qos()
                << dds::core::policy::Durability::Persistent()
                << dds::core::policy::Reliability::Reliable()
                << dds::core::policy::DestinationOrder::SourceTimestamp();
        dds::topic::Topic<Command> topicCommand(dp, "Command", topicQosCommand);
        dds::sub::qos::SubscriberQos subQos_Command = dp.default_subscriber_qos();
        dds::sub::Subscriber sub_command(dp, subQos_Command);        

        dds::sub::qos::DataReaderQos drqosCommand = topicCommand.qos();
        dds::sub::DataReader<NSQC442::Command> drCommand(sub_command, topicCommand, drqosCommand);

Share this post

Link to post
Share on other sites



DestinationOrder is a RxO QoS so you must assure that you've set the same policy both on the writer and the reader. If you've only set it for the reader, then there's a QoS-mismatch that indeed results in no communication happening (anymore).


Apart from that, ordering by SourceTimestamp only orders samples for the same instance (key-value). I you require ordering of samples over multiple instances within a topic or even ordering of samples over a group of topics, then you need to use the 'PRESENTATION' QoS policies (w.r.t. both 'ordered-access' as well as access-scope 'TOPIC' or 'GROUP'). Please note that the current community-edition doesn't support anything beyond the default PRESENTATION QoS -settings (access_scope 'INSTANCE') yet our upcoming community-update in June DOES support full PRESENTATION QoS

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now