msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_kafka_proto.so
#msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_msgconv.so #Provide your msg-broker-conn-str here
msg-broker-conn-str=192.168.0.118;9092
topic=quickstart-events #Optional:
#msg-broker-config=…/…/deepstream-test4/cfg_kafka.txt
Do you mean that all the information is the same? You can also debug that by yourself, the open source path is : opt\nvidia\deepstream\deepstream\sources\libs\nvmsgconv.
its like 1o message in sequence comes with same messsage id , and after 10 message , message id will changed , and then this changed message id will also get 10 times repeat
basically there is a pattern of repetition of same message id 10 times
Could you debug that on your end? The open source path is : opt\nvidia\deepstream\deepstream\sources\libs\nvmsgconv .
Or you can provide the detailed steps for reproducing the problems.
i did debug this code and found a bug , that below mention function is returning duplicate payloads
generate_dsmeta_message_minimal(ctx->privData, frame_meta);
i m able to resolve the problem , by adding a custom code logic in this function to avoid duplicates
else if (ctx->payloadType == NVDS_PAYLOAD_CUSTOM) {
gchar *message = generate_dsmeta_message_minimal(ctx->privData, frame_meta);
if (message) {
// Parse the JSON message to extract the 'id' field
JsonParser *parser = json_parser_new();
GError *error = NULL;
if (!json_parser_load_from_data(parser, message, -1, &error)) {
g_error("Error parsing JSON: %s", error->message);
g_error_free(error);
} else {
JsonObject *root = json_node_get_object(json_parser_get_root(parser));
const gchar *id = json_object_get_string_member(root, "id");
// Check if the id is different from the previous id
if (lastCustomId == NULL || g_strcmp0(id, lastCustomId) != 0) {
g_free(lastCustomMessage); // Free the previous message if exists
// Store the new id and message to avoid duplicates
lastCustomId = g_strdup(id);
lastCustomMessage = g_strdup(message);
len = strlen(message);
// Remove '\0' character at the end of string and just copy the content.
payload->payload = g_memdup(message, len);
payload->payloadSize = len;
}
}
g_object_unref(parser);
g_free(message);
}