A Subscriber is a consumer of data on a Domain. It uses the DomainParticipants to gain access to the Domain and is created using it. A Subscriber allows the DataReaders associated with it to share the same behaviour, such as:

To use the default settings:

dds_entity_t subscriber = dds_create_subscriber (participant, NULL, NULL);

To supply your own settings:

dds_qos_t *qos = dds_create_qos ();
dds_listener_t *listener = dds_create_listener(NULL);
dds_lset_subscription_matched(listener, subscription_matched);
dds_entity_t subscriber = dds_create_subscriber (participant, qos, listener);


Any DataReaders created using sub inherit the qos and listener functionality as set through it.