Why message in kafka consumer is an array of strings separated by '|'?

Please provide complete information as applicable to your setup.

• Hardware Platform: GPU
• DeepStream Version: 6.2
• Language: cpp

I am getting the message.value in kakfa like the following -

{
  "version" : "4.0",
  "id" : "161",
  "@timestamp" : "2023-05-15T01:27:37.528Z",
  "sensorId" : "0",
  "objects" : [
    "1|501|491|825|923|Person|#||0||||0.970665|#|pose3D|pelvis,-185.179886,944.170349,2601.482910,0.274170|left-hip,-174.041702,831.402771,2602.955078,0.153687...
....................................
  ]
}

Here “objects” is an array of strings separated by “|”. I want it to be the key-value pair.

A portion of code in deepstream application -

....................................
........................................
NvDsEventMsgMeta *msg_meta = (NvDsEventMsgMeta *)g_malloc0(sizeof(NvDsEventMsgMeta));
NvDsPersonObject *msg_meta_ext = (NvDsPersonObject *)g_malloc0(sizeof(NvDsPersonObject));

msg_meta->type = NVDS_EVENT_ENTRY;
msg_meta->objType = (NvDsObjectType)NVDS_OBJECT_TYPE_PERSON;
msg_meta->bbox.top = obj_meta->rect_params.top;
msg_meta->bbox.left = obj_meta->rect_params.left;
msg_meta->bbox.width = obj_meta->rect_params.width;
msg_meta->bbox.height = obj_meta->rect_params.height;
msg_meta->extMsg = msg_meta_ext;
msg_meta->extMsgSize = sizeof(NvDsPersonObject);
.............................................
...........................................
..........................................

nvmsgconv plugin is opensource, you can add log to debug and modify it.
please refer to generate_event_message_minimal or generate_event_message in \opt\nvidia\deepstream\deepstream-6.2\sources\libs\nvmsgconv\deepstream_schema\eventmsg_payload.cpp, you can replace “|”.

in application I set -
g_object_set(G_OBJECT(msgconv), "payload-type", 1, NULL); // Minimal schema

I have made necessary changes in generate_event_message_minimal in eventmsg_payload.cpp
then I built using make file in /opt/nvidia/deepstream/deepstream-6.2/sources/libs/nvmsgconv
it creates libnvds_msgconv.so. where should I integrate this?

nvmsgbroker is using proto-lib libnvds_kafka_proto.so which is supposed to be for connection to kafka.

Can you help me what should I do after changing in eventmsg_payload.cpp and generating libnvds_msgconv.so?

there will be libnvds_msgconv.so after executing make, then replace /opt/nvidia/deepstream/deepstream/lib/libnvds_msgconv.so with libnvds_msgconv.so.

thanks, working.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.