# MQTT Subscription

**URL:** <https://forums.developer.nvidia.com/t/mqtt-subscription/280950>\
**Category:** DeepStream SDK\
**Created:** [February 1, 2024, 11:16am UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950 "2024-02-01T11:16:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierantonio.merlino](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pierantonio.merlino](https://forums.developer.nvidia.com/u/pierantonio.merlino)\
**Post date:** [February 1, 2024, 11:16am UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/1 "2024-02-01T11:16:54Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)** Jetson  
**• DeepStream Version** 6.4  
**• JetPack Version (valid for Jetson only)** latest  
**• TensorRT Version**  
**• NVIDIA GPU Driver Version (valid for GPU only)**  
**• 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’m successfully using the NvMsgBroker to send metadata to a MQTT broker and process them in an external application.  
Now, I want to enable cloud-to-edge messaging and send commands or simple data to the DS pipeline. Can I use the NvMsgBroker to do that? From the inspection, it seems that the plugin is only a sink, so my suspect is that this is not possible.

Should I use directly the Paho MQTT client to subscribe to a specific topic to receive messages? Or is there a better way to do that?

BTW, I’m using Python.

Thanks!

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [February 1, 2024, 3:19pm UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/3 "2024-02-01T15:19:50Z")

</div>

> [@pierantonio.merlino](#):
>
> Can I use the NvMsgBroker to do that?

nvmsgbroker plugin and lowlevel are opensource. nvmsgbroker is used to send message to broker. it can’t used to receive message. please refer to the [gst-nvmsgbroker](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvmsgbroker.html). why do you need to DS to receive "commands or simple data ", AYK, Deepstream is used to process video and audio data.

---

<div class="post-metadata">

**Author:** ![pierantonio.merlino](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pierantonio.merlino](https://forums.developer.nvidia.com/u/pierantonio.merlino)\
**Post date:** [February 1, 2024, 4:07pm UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/4 "2024-02-01T16:07:13Z")

</div>

Thanks for the reply.

> why do you need to DS to receive "commands or simple data "

For example, we could send remotely a command to start the video acquistion upon an event. Or send data from a sensor that could be “merged” with the inference results from the video stream (but the latter doesn’t came up from a real scenario. It’s only my thought).

Anyway, I suppose that the only way is to use paho and subscribe to a topic or modify the nv broker component…

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [February 2, 2024, 1:40am UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/5 "2024-02-02T01:40:28Z")

</div>

Thanks for the sharing! The DeepStream 6.4 introduces [nvmultiurisrcbin](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvmultiurisrcbin.html) plugin with REST API support for dynamic sensor add/remove capability. Users can add or remove sensors over REST API calls made to a HTTP endpoint.  
please refer to sample \opt\nvidia\deepstream\deepstream\sources\apps\sample\_apps\deepstream-server.

---

<div class="post-metadata">

**Author:** ![pierantonio.merlino](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pierantonio.merlino](https://forums.developer.nvidia.com/u/pierantonio.merlino)\
**Post date:** [February 6, 2024, 4:03pm UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/6 "2024-02-06T16:03:14Z")

</div>

Thanks for the reply. I’ll take a look at the nvmultisrcbin plugin.

---

<div class="post-metadata">

**Author:** ![fanzh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fanzh/32/115955_2.png) [@fanzh](https://forums.developer.nvidia.com/u/fanzh)\
**Post date:** [February 14, 2024, 2:24am UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/7 "2024-02-14T02:24:43Z")

</div>

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!

---

<div class="post-metadata">

**Author:** ![pierantonio.merlino](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pierantonio.merlino](https://forums.developer.nvidia.com/u/pierantonio.merlino)\
**Post date:** [February 14, 2024, 8:22am UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/8 "2024-02-14T08:22:31Z")

</div>

At the end I used Paho to implement a subscriber.  
Thanks for the support. The ticket can be closed.

---

<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:** [February 28, 2024, 8:23am UTC](https://forums.developer.nvidia.com/t/mqtt-subscription/280950/9 "2024-02-28T08:23:21Z")

</div>

Closed on February 28, 2024, 8:23am UTC

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