Get Active Reliable Reader information

4 posts / 0 new
Last post
Offline
Last seen: 1 week 1 day ago
Joined: 10/30/2020
Posts: 4
Get Active Reliable Reader information

The dds::pub::NoOpDataWriterListener has "on_reliable_reader_activity_changed" which give the correct count of total active reliable readers.

is there a way to get the SubscriptionBuiltinTopicData for only the active reliable readers?

what i'm seeing is that after the total_active goes down, matched_subscription_data will still list in them.  is there a way to look through this list and know which ones are active vs inactive?

Howard's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 11/29/2012
Posts: 661
Offline
Last seen: 1 week 1 day ago
Joined: 10/30/2020
Posts: 4

i've tried that.  it doesn't result in the same count as active_count.

Howard's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 11/29/2012
Posts: 661

I assume you used matched_subscription_data() to get the data for all subscriptions?   

How do you mean that the count isn't the same as active_count?  How different are the values?  Which one is greater?

Note active_count only applies to RELIABLE DataReaders.   I think that is_matched_subscription_active probably applies to all DataReaders, both reliable and best_effort.  So, I would expect the number of is_matched_subscription_active==true DataReaders to be greater than active_count when there are best_effort DataReaders.