You are here: Part 2: Core Concepts > DDS Entities > Exclusive Areas (EAs) > Restricted Operations in Listener Callbacks

Restricted Operations in Listener Callbacks

Based on the background and rules provided in Exclusive Areas (EAs), this section describes how EAs restrict you from using various Connext DDS APIs from within the Listener callbacks of different Entities. Reader callbacks take the SubscriberEA. Writer callbacks take the PublisherEA. DomainParticipant callbacks take the ParticipantEA.

These restrictions do not apply to builtin topic listener callbacks.

By default, each Publisher and Subscriber creates and uses its own EA, and shares it with its children DataWriters and DataReaders, respectively. In that case:

Within a DataWriter/DataReader’s Listener callback, do not:

Within a Subscriber/DataReader’s Listener callback, do not call any operations on:

Within a Publisher/DataWriter Listener callback, do not call any operations on:

Connext DDS will enforce the rules to avoid deadlock, and any attempt to call an illegal method from within a Listener callback will return DDS_RETCODE_ILLEGAL_OPERATION.

However, as previously mentioned, if you are willing to trade-off concurrency for flexibility, you may configure individual Publishers and Subscribers (and thus their DataWriters and DataReaders) to share the EA of their participant. In the limit, only a single ParticipantEA is shared among all Entities. When doing so, the restrictions above are lifted at a cost of greatly reduced concurrency. You may create/delete/enable/set_qos’s and generally call all of the methods of any other entity in the Listener callbacks of Entities that share the ParticipantEA.

Use the EXCLUSIVE_AREA QosPolicy (DDS Extension) of the Publisher or Subscriber to set whether or not to use a shared exclusive area. By default, Publishers and Subscribers will create and use their own individual EAs. You can configure a subset of the Publishers and Subscribers to share the ParticipantEA if you need the Listeners associated with those Entities or child Entities to be able to call any of the restricted methods listed above.

Regardless of how the EXCLUSIVE_AREA QosPolicy is set, the following operations are never allowed in any Listener callback:

© 2016 RTI