# ZMQ with Deepstream

**URL:** <https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427>\
**Category:** DeepStream SDK\
**Tags:** gstreamer\
**Created:** [April 6, 2022, 5:37pm UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427 "2022-04-06T17:37:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghavendra.ramya](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@raghavendra.ramya](https://forums.developer.nvidia.com/u/raghavendra.ramya)\
**Post date:** [April 6, 2022, 5:37pm UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427/1 "2022-04-06T17:37:31Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)** Jetson  
**• DeepStream Version** Deepstream 6.0  
**• JetPack Version (valid for Jetson only)** JetPack 4.6  
**• TensorRT Version** TensorRT 8

I need to modify Deepstream in order to send metadata ZeroMQ (ZMQ) and send an RTSP stream that has bounding boxes on targets. Has anyone done this earlier and can someone give me some pointers? I am thinking of modifying nvmsgbroker to add ZMQ.

Thank you,  
Ramya.

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [April 8, 2022, 9:01am UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427/3 "2022-04-08T09:01:14Z")

</div>

Please check this.  
Generating custom metadata for different type of objects:  
In addition to common fields provided in NvDsEventMsgMeta structure, user can also create custom objects and attach to buffer as NVDS\_EVENT\_MSG\_META metadata. To do that NvDsEventMsgMeta provides “extMsg” and “extMsgSize” fields. User can create custom structure, fill that structure and assign the pointer of that structure as “extMsg” and set the “extMsgSize” accordingly. If custom object contains fields that can’t be simply mem copied then user should also provide function to copy and free those objects.

Refer generate\_event\_msg\_meta() to know how to use “extMsg” and “extMsgSize” fields for custom objects and how to provide copy/free function and attach that object to buffer as metadata.

---

<div class="post-metadata">

**Author:** ![raghavendra.ramya](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@raghavendra.ramya](https://forums.developer.nvidia.com/u/raghavendra.ramya)\
**Post date:** [April 19, 2022, 3:13am UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427/5 "2022-04-19T03:13:22Z")

</div>

I apologize for the delay in responding. I need to send the metadata over zmq. I don’t want to change the format. I need to send the same JSON object containing the metadata, but i need it over ZMQ and not Kafka/MQTT etc. that is supported by Deepstream.  
Does it still need modification in nvmsgconv?

Thank you.

---

<div class="post-metadata">

**Author:** ![Amycao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/amycao/32/11342_2.png) [@Amycao](https://forums.developer.nvidia.com/u/Amycao)\
**Post date:** [April 21, 2022, 10:25am UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427/6 "2022-04-21T10:25:26Z")

</div>

To support ZMQ broker, you need to use the messaging interface, `nvds_msgapi` , to implement a custom protocol message handler and integrate it with DeepStream applications.  
[Gst-nvmsgbroker — DeepStream 6.0.1 Release documentation (nvidia.com)](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvmsgbroker.html)

---

<div class="post-metadata">

**Author:** ![raghavendra.ramya](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@raghavendra.ramya](https://forums.developer.nvidia.com/u/raghavendra.ramya)\
**Post date:** [April 21, 2022, 8:37pm UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427/7 "2022-04-21T20:37:30Z")

</div>

Thank you for letting me know. I will try this.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [May 5, 2022, 8:37pm UTC](https://forums.developer.nvidia.com/t/zmq-with-deepstream/210427/8 "2022-05-05T20:37:55Z")

</div>

Closed on May 5, 2022, 8:37pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
