Hi,
I am experiencing high message loss even though i use the RELIABLE Qos policy. When i turn off reliable on Subscriber the loss is less else if the Reliable mode is on in subscriber the loss is huge. This is very strange to see. Someone please look at my configuration below and let me know what is wrong with it. There are no errors that i get when i run this.. only the subscriber program recieves very few messages...
Here are my QOS settings for DataWriter and DataReaders
############ Data Writer QOS #############################################
datawriter_qos.reliability.kind = ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS;
datawriter_qos.history.kind = HistoryQosPolicyKind.KEEP_ALL_HISTORY_QOS;
datawriter_qos.protocol.rtps_reliable_writer.high_watermark = 1;
datawriter_qos.protocol.rtps_reliable_writer.low_watermark = 0;
datawriter_qos.protocol.rtps_reliable_writer.max_heartbeat_retries = 100;
datawriter_qos.resource_limits.max_samples = ResourceLimitsQosPolicy.LENGTH_UNLIMITED;
datawriter_qos.resource_limits.initial_samples = 100000;
datawriter_qos.protocol.rtps_reliable_writer.min_nack_response_delay.sec = 0;
datawriter_qos.protocol.rtps_reliable_writer.min_nack_response_delay.nanosec = 0;
datawriter_qos.protocol.rtps_reliable_writer.max_nack_response_delay.sec = 0;
datawriter_qos.protocol.rtps_reliable_writer.max_nack_response_delay.nanosec = 0;
datawriter_qos.reliability.max_blocking_time.sec = 3;
datawriter_qos.reliability.max_blocking_time.nanosec = 0;
######################### Data reader QOS ########################3
data_reader_qos.reliability.kind = ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS;
data_reader_qos.reliability.kind =
ReliabilityQosPolicyKind.RELIABLE_RELIABILITY_QOS;
data_reader_qos.history.kind = HistoryQosPolicyKind.KEEP_ALL_HISTORY_QOS;
// reader queue can be constant regardless of rate
int unresolvedSamplePerRemoteWriterMax = 100;
data_reader_qos.resource_limits.max_samples =
ResourceLimitsQosPolicy.LENGTH_UNLIMITED;
data_reader_qos.resource_limits.initial_samples = 100000;
data_reader_qos.reader_resource_limits.max_samples_per_remote_writer =
data_reader_qos.resource_limits.initial_samples;
data_reader_qos.resource_limits.max_samples_per_instance =
ResourceLimitsQosPolicy.LENGTH_UNLIMITED;
// the writer probably has more for the reader; ask right away
data_reader_qos.protocol.rtps_reliable_reader.min_heartbeat_response_delay.sec = 0;
data_reader_qos.protocol.rtps_reliable_reader.min_heartbeat_response_delay.nanosec
= 0;
data_reader_qos.protocol.rtps_reliable_reader.max_heartbeat_response_delay.sec = 0;
data_reader_qos.protocol.rtps_reliable_reader.max_heartbeat_response_delay.nanosec
= 0;
#######################Participant QOS
participant_qos.receiver_pool.buffer_size=30000000;
############################
UDP Transport QOS
UDPv4Transport.Property_t udp4 = new UDPv4Transport.Property_t();
TransportSupport.get_builtin_transport_property(participant, udp4);
udp4.ignore_loopback_interface = 1;
udp4.ignore_nonrunning_interfaces = 1;
udp4.message_size_max = 65526;
udp4.send_socket_buffer_size = -1;
udp4.recv_socket_buffer_size = -1;
TransportSupport.set_builtin_transport_property(participant, udp4);
participant.enable();
UDPv4Transport.Property_t udp41 = new UDPv4Transport.Property_t();
TransportSupport.get_builtin_transport_property(participant, udp41);
Hi,
How are you detecting sample loss? Are you getting the on_sample_lost call back in the DataReader?
Regards,
Roshan
I use the QoS settings that are used in the examples and now it seems to work without message loss.