Subscriber freed and restarted : no data received

2 posts / 0 new
Last post
Offline
Last seen: 3 years 3 weeks ago
Joined: 07/04/2016
Posts: 6
Subscriber freed and restarted : no data received

Hello,

In my project, I need sometimes to destroy a subscriber and all its related datareaders, to instanciate them again after with the same parameters, without changing anything with participant.

The environment is .NET 4.0 / RTI DDS 5.1.0

Here is the sequence :

---subscriber intialization---

sub = participant.create_subscriber(SubQos, ...);

...

DataReader reader = sub.create_datareader_with_profile(SomeContentFilteredTopic, ..., DDS.StatusMask.STATUS_MASK_ALL);

...

reader.enable();

sub.begin_access();

SubQos.partition.name.ensure_length(1,1);

SubQos.partition.name.set_at(0, "*/somePartition");

sub.set_qos(SubQos);

 

---End of initialization---

--- Subscriber shutdown ---

DataReaderSeq seqDataReaders = new DataReaderSeq();
m_oSubscriber.get_all_datareaders(seqDataReaders);

for (int i = 0; i < seqDataReaders.buffer.Length; i++)
{
        m_oSubscriber.delete_datareader(ref seqDataReaders.buffer[i]);
}

m_oSubscriber.end_access();

m_oSubscriber.delete_contained_entities();

--- End of subscriber shutdown ---

 

The problem is :

I can intialize and then shutdown my subscriber twice. Then, on the next initialization, my subscriber and its related datareaders won't receive any data.

Admin Console detects the subscriber and its related readers without any problem each time the subscriber is initialized.

When the problem occurs, the DataReaderListener methods "on_liveliness_changed" and "on_subscription_matched" are not called anymore.

Edit :

Actually, the problem is even bigger : the other subscribers stop receiving datas when a subscribers is shutdown and restarted for the second time. They're configured to listen to same data types but on other partitions, and from other publishers.

 

Thank you for your help,

Mathieu

 

 

 

Organization:
Howard's picture
Offline
Last seen: 19 hours 2 min ago
Joined: 11/29/2012
Posts: 608

Hi Mathieu,

Well, it'll be difficult to figure out what the problem is through this technical forum.  However, I see that your project has a support contract with RTI, and you specifically have access to our customer portal in which you can entered a new support case.  That will probably be the most efficient way to get your problem solved.

I do note that your code snippet is calling begin_access() and end_access() on your subscriber object. 

1) this is only useful to do when using DDS_PresentationQosPolicy::access_scope set to  DDS_GROUP_PRESENTATION_QOS.  Otherwise it's not doing anything.

2) if you are trying to use GROUP_PRESENTATION access scope, you usually do the begin_access/end_access every time you take data from the DataReaders created by the subscriber. It is not something you execute at initialization time and then at shutdown time.