Implications to set publish_with_original_info to true in Routing Service configuration

The default value for publish_with_original_info is false. When this property is set to false RTI Routing service will change the metadata fields Writer GUID and Sequence Number in every sample. As a consequence, the applications can not know the original source of the sample, that is the ID of the original DataWriter. For this reason, repeated samples will not be filtered.

 If you enable publish_with_original_info in RTI Routing Service, your samples are published from the Routing Service DataWriter with the original writer info and sequence number. The effect of setting this property to true is closely related to the value of the property  dds.data_reader.state.filter_redundant_samples:
  • If filter_redundant_samples is set to true (default): redundant samples will be dropped in the Routing Service DataReader. This will save bandwidth because there will be samples that will not be forwarded. Also, it could increase memory consumption because you will need to process each sample.

  • If filter_redundant_samples is set to false: the DataReader will not drop any samples and Routing Service will try to forward each sample repeated or not to the corresponding DataWriter for the route used.

Note that it is not allowed to send repeated or unordered samples. Therefore, if you try to send a sample with a lower sequence number than the latest one, the Routing Service DataWriter will throw an error because previously it wrote a sample with the same or later sequence number. The error thrown by Routing Service will be similar to:

ROUTERProcessor_onRouteEvent:processor 'rti.routingservice.RoutingProcessor' error (0): !write (retcode: 3)
ROUTERTopicRoute_processEvent:!process route event
PRESWriterHistoryDriver_resolveAndCheckOriginalWriterInfo:sequence number out of order. Expected greater or equal to (0,3)
PRESPsWriter_writeInternal:!sequence number order
ROUTERDdsStreamWriter_write:!write (retcode: 3)
ROUTERStreamWriter_write:adapter 'rtidds' error (0): !write (retcode: 3)
ROUTERRoutingProcessor_onRouteEvent: write error on output at index 0. 1 Samples have been dropped
ROUTERRoutingProcessor_route:!route from input to matching outputs

For example, this situation can happen when Persistence Service is configured to send historical data and you restart the Persistence Service.