How to test nv_msgbroker autoreconnect feature

• Hardware Platform (Jetson Xavier NX)
• DeepStream 6.0
• JetPack 4.6.1
• TensorRT 8.2.1
• Issue Type: questions

I use deepstream-test5 and my own libnvds_mqtt_proto.so with eclipse paho C client library to send inferenced metadata to mqtt broker. The sink type is 6(MsgConvBroker) in test5_config_file_src_infer.txt.

Everything works fine even I plug-out network cable and then plug-in it after several seconds. I try to test with auto-reconnect=0 or 1, but it works as same.

Where should cfg_nvmsgbroker.txt be located? Is there suggested steps to verify the behavior difference for auto-reconnect=0 and 1? Thank you.

I will check and feedback later.

Sorry for the late.
You can disconnect the connection between device and host from which broker setup, and to see if app can auto connected to the broker successfully.

No problem. Yes, I did disconnect that connection and the application can automatically connect to the broker after the connection is successfully restored regardless of auto-reconnect=0 or 1. So I am trying to figure out the difference between auto-reconnect=0 and 1. Thank you

Hello! Certain message broker libraries have their own inbuilt auto-reconnect option set as default, so the auto-reconnect configuration in cfg_nvmsgbroker.txt would not override the inbuilt auto-reconnect option of the proto lib. For example, librdkafka will automatically reconnect after reconnect.backoff.jitter.ms (default 500ms).
To disable the inbuilt librdkafka autoreconnect and test with the DS nvmsgbroker auto-reconnect, we would set this configuration to a very high number in the file /opt/nvidia/deepstream/deepstream/sources/libs/kafka_protocol_adaptor/cfg_kafka.txt

proto-cfg = “reconnect.backoff.jitter.ms=360000”

Please check if the mqtt broker has a similar option which may be causing this behavior.