Behavior of max_instances violation on the Reader side is unclear.
-
Key: DDS15-337
-
Status: open
-
Source: ZettaScale Technology ( Mr. Erik Hendriks)
-
Summary:
In the ResourceLimitsQosPoliicy you can set limits to the amount of instances that you would accept on your Writers or Readers. However, it is unclear what should happen when an instance limit is violated on the Reader side.
Consider the following Use-Case:- A Reader sets a ResourceLimit with max_instances is n.
- A matching Writer successfully transmits n ALIVE instances.
- Now the Writer transmits a new keyvalue for instance n+1, which violates the Reader limit.
What should the Reader do in this case? It should probably reject the sample, which for Reliable topics typically results in the Writer retransmitting it again at a later moment in time. In the mean time the Reader can consume some samples by taking them out of its cache, so that in a subsequent retransmission attempt the sample can now be accepted. However, in case of an instance limit violation, there is nothing the Reader can do to make room for new instances:
- Reader instances can only be purged if they are empty (i.e. all samples taken out) and the Writer has unregistered them.
- However, the Reader doesn't control the instance lifecycle, and so unless a Writer unregisters an instance, there is nothing the Reader can do to make room for the rejected instance.
- This could result in the Writer continuously retransmitting samples for the rejected instance, and the Reader continuously rejecting them.
- Even worse, even when the Writer wants to unregister an older instance at a later moment in time, it cannot deliver this unregister message until the rejected sample has successfully been inserted into the Reader history due to the order preservation requirements of the Reliable protocol.
All in all, if there is a mismatch between the max_instances setting between a Reader and a Writer where the Reader is more constrained than the Writer, there is a severe risk that the Writer cannot make any progress with respect to this Reader.
We might want to consider what to do in scenarios like this.
-
Reported: DDS 1.4 — Wed, 10 Dec 2025 17:40 GMT
-
Updated: Wed, 10 Dec 2025 17:43 GMT