Multiple messages to multiple topics - bboxes and analytics

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only) NA
• TensorRT Version 7.2.2
• NVIDIA GPU Driver Version (valid for GPU only) 460
• Issue Type( questions, new requirements, bugs) question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hi,

I am have an app based on test5 that I would like to enrich with features of dsanalytics plugin. I have seen https://github.com/NVIDIA-AI-IOT/deepstream-occupancy-analytics Now I’m struggling to figure out how to send 2 types of messages to two separate kafka topics. That is - I want to create and send similar-to-standard message with bbox for each detected object as well as the occupancy message generated after analytics.

My understanding is that I should have 2 different msgmeta objects generated in bbox_generated_probe_after_analytics but I’m wondering they will be picked up correctly by their respective sinks? I have read previous posts that mentioned setting msg-conv-comp-id and msg-broker-comp-id and I know that this is checked both by gst msgconv and gst msgbroker but I don’t understand what exactly needs to be changed. Shouldn’t compId parameters be set when msg-conv-comp-id and msg-broker-comp-id are set in config?

Related to that: what is the difference between parameter msg-conv-msg2p-lib set in [sink] group and the same set via [message-converter] after setting disable-msgconv=1 in sink? Where should I set msgconv in my scenario? Right now I have a situation where my msgconv works when set in [message-converter] but it cannot be opened not when set in in [sink] (and it was working before with test5).

And finally, in DS5.1, in sink group there is new-api parameter explained as use protocol adapter library api’s directly or use new msgbroker library wrapper api’s - where can we find more explanation about the differences between the two?

Looking forward to hear from you and as always thanks for your support

Will check and update asap.

You can use below config for your case, besides, you need to modify the application to fill componentId field of NvDsEventMsgMeta structure. a simple code:
In test5 app, function generate_event_msg_meta() add the following code.
if (class_id == 0 ) {
meta->componentId = 1;
} else if (class_id == 2) {
meta->componentId = 2;
}

[sink1]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker
type=6
msg-conv-config=dstest5_msgconv_sample_config.txt
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM - Custom schema payload
msg-conv-payload-type=0
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_kafka_proto.so
msg-conv-msg2p-lib=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_msgconv.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str=localhost;9092
topic=topic
#msg-conv-comp-id=1
msg-broker-comp-id=1
#Optional:
msg-broker-config=…/…/deepstream-test4/cfg_kafka.txt

[sink2]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker
type=6
msg-conv-config=dstest5_msgconv_sample_config.txt
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal
#(256): PAYLOAD_RESERVED - Reserved type
#(257): PAYLOAD_CUSTOM - Custom schema payload
msg-conv-payload-type=0
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_kafka_proto.so
msg-conv-msg2p-lib=/opt/nvidia/deepstream/deepstream-6.0/lib/libnvds_msgconv.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str=localhost;9092
topic=rawdata
#msg-conv-comp-id=2
msg-broker-comp-id=2
#Optional:
msg-broker-config=…/…/deepstream-test4/cfg_kafka.txt

Thanks, looks like the trick for me was to make sure no componentId is set to 0.

What about:

(the part about my msgconv not working in one of the cases is not relevant anymore)

And:

Check this,
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvmsgbroker.html#nv-msgbroker-message-broker-interface
nv_msgbroker: Message Broker interface

1 Like