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.
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.
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.