msgbroker = Gst.ElementFactory.make("nvmsgbroker", "msgbroker")
if not msgbroker:
logger.error(f"Unable to create msgbroker\n")
msgbroker.set_property('proto-lib', args.proto_lib)
msgbroker.set_property('conn-str', args.conn_str)
msgbroker.set_property('sync', False)
msgbroker.set_property('topic', args.topic)
msgbroker.set_property('async', False)
msgbroker.set_property('config', f"{script_dir}/{args.config}")
why all meg to a same Partition:0
log
Dec 5 04:05:48 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: cfg setting proto_cfg = message.timeout.ms=2000;retries=3#012
Dec 5 04:05:48 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: kafka partition key field name = sensorId#012
Dec 5 04:05:48 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: Kafka Consumer group = card #012
Dec 5 04:05:48 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: set config setting message.timeout.ms to 2000#012
Dec 5 04:05:48 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: set config setting retries to 3#012
Dec 5 04:05:48 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: Kafka connection successful#012
Dec 5 04:05:50 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: no matching json field found based on kafka key config; using default partition#012
Dec 5 04:05:50 a5b81c3ab586 python3: DSLOG:NVDS_KAFKA_PROTO: no matching json field found based on kafka key config; using default partition#012
nvmsgbroker plugin and low-level are opensource in DS7.1. please add log in nvds_msgapi_send_async of \opt\nvidia\deepstream\deepstream-7.1\sources\libs\kafka_protocol_adaptor\nvds_kafka_proto.cpp to check why “no matching json field found” was printed.
from the function nvds_msgapi_send_async, the code will call json_get_key_value to parse partition_key_field from payload. can you please print payload to check why “no matching json field found” is printed when setting “partition-key = sensorId”?
yes. the payload is generated in nvsmgconv plugin. these property setting of nvsmbroker does not modify the payload. if async is true, the code will call nvds_msgapi_send_async.
There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks