Multiple MsgConvBroker sink in deepstream test5 app

Is it possible to set 2 sinks type MsgConvBroker with each source like under config?
i have try with this config but not working.
Can you help me fix it?

[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=1
source-id=0
#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=1
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_kafka_proto.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str=192.168.0.100;9092;endPlate
topic=endPlate
#Optional:
#msg-broker-config=cfg_kafka.txt

[sink2]
enable=1
source-id=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=1
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_kafka_proto.so
#Provide your msg-broker-conn-str here
msg-broker-conn-str=192.168.0.100;9092;frontPlate
topic=frontPlate
#Optional:
#msg-broker-config=cfg_kafka.txt

• Hardware Platform Jetson
• DeepStream 5.0
• JetPack Version 4.4

Hi,
first for kafka protocol adapter, connection string in this form,
msg-broker-conn-str=ip;port
second, for multi brokers and multi converters, you need to specify “msg-conv-comp-id” and “msg-broker-comp-id” to avoid duplicate messages. these fields force converter / broker components to process only those messages having same value for componentId field and ignore other messages. and you should modify app to fill componentId field of NvDsEventMsgMeta structure. or you can set disable-msgconv to 1 to just have one converter.

1 Like

Hi, thank your rep

with this config i can set:

object from source id 0 will sent to topic0
object from source id 1 will sent to topic1

or no

Yes, did you meet issues?

1 Like

i’m not clear about this parameter, can you give me an example

These fields force converter / broker components to process only those messages having same value for componentId field and ignore other messages
check code from broker plugin in gstnvmsgbroker.c line 493, converter also processed like this.
if (self->compId && payload->componentId != self->compId)