How to config basic MQTT nvmsgbroker on deepstreap-app?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): x86 - RTX 3090
• DeepStream Version: 6.3
• Docker image: nvcr.io/nvidia/deepstream:6.3-gc-triton-devel

I am new for deepstream. I tried to create a deepstream-app using YoloV7-Seg. Currently, I am using this config_file (DeepStream-Yolo-Seg/deepstream_app_config.txt at master · marcoslucianops/DeepStream-Yolo-Seg · GitHub).
Everything work well, and I want to add nvmsgbroker to send MQTT message. How to do that?
Am I add some configuration to config file? Or I need to add some additional code?

Anyone please give me any solutions? Manythanks.

Regards,
Tung

You can refer to our source code sources\apps\sample_apps\deepstream-test5\configs\test5_config_file_nvmultiurisrcbin_src_list_attr_all.txt to learn how to configure the MsgConvBroker sink.

[sink1]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvdrmvideosink 6=MsgConvBroker
type=6
...

Hi @yuweiw
I have tried to apply that config, but when detection there is NO event was sent.
I have check deepstream-app source code and see below function do NOT generate NvDsEventMsgMeta for every object:

/**
 * Callback function to be called once all inferences (Primary + Secondary)
 * are done. This is opportunity to modify content of the metadata.
 * e.g. Here Person is being replaced with Man/Woman and corresponding counts
 * are being maintained. It should be modified according to network classes
 * or can be removed altogether if not required.
 */
static void
all_bbox_generated (AppCtx * appCtx, GstBuffer * buf,
    NvDsBatchMeta * batch_meta, guint index)
{
  guint num_male = 0;
  guint num_female = 0;
  guint num_objects[128];
...

However, deepstream-test5 source code included Generate NvDsEventMsgMeta for every object at below function:

/**
 * Callback function to be called once all inferences (Primary + Secondary)
 * are done. This is opportunity to modify content of the metadata.
 * e.g. Here Person is being replaced with Man/Woman and corresponding counts
 * are being maintained. It should be modified according to network classes
 * or can be removed altogether if not required.
 */
static void
bbox_generated_probe_after_analytics (AppCtx * appCtx, GstBuffer * buf,
    NvDsBatchMeta * batch_meta, guint index)
{
  NvDsObjectMeta *obj_meta = NULL;
  GstClockTime buffer_pts = 0;
  guint32 stream_id = 0;

Do you think I need to add more code to all_bbox_generated() function at deepstreap-app source code to make MsgBroker work well?

Yes. You need to migrate the code to deepstream-app as per test5.