Publish only string to Kafka Broker

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 6.0.1

I read some DS examples about Kafka, but I only want to publish one string (the image path) to Kafka (without needing information about the object). Can you guide me?

I created my own broker and to get the custom messages, you would have to create your own struct in nvdsmeta_schema.h and then have a custom nvmsgconv to process this new message.

I don’t know how the kafka module will consume this. You probably have to figure out how the custom payload works. Gst-nvmsgbroker — DeepStream documentation

For me since I was creating my own zmq broker, I modified their example code and consume the custom payload in this function to be sent out via zmq.

NvDsMsgApiErrorType nvds_msgapi_send_async

nvmsgconv is responsible for converting meta to a Json string. At default, the code will convert some common information like object rect. if you want to custmize, you can modify the code /opt/nvidia/deepstream/deepstream/sources/libs/nvmsgconv/. especially, please build the code and repalce the /opt/nvidia/deepstream/deepstream/lib/libnvds_msgconv.so after modifying.

1 Like

Can you guide more for me ? Because the directory is very complex?

I don’t understand your NvDsMsgApiErrorType nvds_msgapi_send_async. Can you explain more or guide me edit for publish my image path (after save) ?

you don’t need to modify nvds_msgapi_send_async. please read nvmsgconv doc first. do you want to use msg2p-newapi=0 or msg2p-newapi=1?

Why don’t you try to compile it first. /opt/nvidia/deepstream/deepstream/sources/libs/nvmsgconv/

And replace it /opt/nvidia/deepstream/deepstream/lib/libnvds_msgconv.so

Add some print statements to understand how it works, and do the above. I would look at this file nvmsgconv.cpp as this have the main functions to create the messages. You can use gst-inspect to check if your plugin is working correctly before replacing /opt/nvidia/deepstream/deepstream/lib/libnvds_msgconv.so.

The only way you can learn how to do this is to add print statements to understand how it works.

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!