Send to 2 kafka topics using componentId

I need to send to 2 different Kafka topics according to the class of the object detected,
do I need to make a msgconv and a msgbroker for each topic and set the componentId for each one, as shown in below figure


When I tried this configuration the pipeline didn’t work.
I am using Deepstream 6.1 with python

please refer to this topic Multiple messages to multiple topics - bboxes and analytics

I checked this topic and I didn’t fully understand the sink config, does the sink look like the attached image or is it a single nvmsgconv with 2 nvmsgrokers?

here is a solution, Multiple messages to multiple topics - bboxes and analytics - #4 by Amycao
there will be two groups of msgconv+msgbroker, you can dump the gstreamer pipeline by this method, and msgconv and msgbroker are opensource, they are created in create_msg_conv_broker_bin, the source is in opt\nvidia\deepstream\deepstream\sources\gst-plugins.

Thank you for your help, turns out I was missing a queue for each branch.
working pipeline:-