How to use msgbroker in deepstream


I have seen a lot of demo videos about using message broker with Deepstream especially with Azure IoT Hub, I don’t experience in using message brokers but I am reading about it.

I found RabbitMQ is a good thing to test on, I installed RabbitMQ management in my local system by following the tutorial from here:

And thereafter I am trying to run deepstream-test4 with the following commands:

deepstream-test4-app -i ../../../../samples/streams/sample_720p.h264 -p /opt/nvidia/deepstream/deepstream-4.0/lib/ -c cfg_amqp.txt -s 0

The content inside the cfg_amqp.txt are:

password = admin
hostname =
username = admin
port = 5672
exchange = amqp.topic
topic = deepstream_metadata

Initially the app failed to run with an error message:

(deepstream-test4-app:2120): GLib-CRITICAL **: 12:24:32.820: g_strchug: assertion 'string != NULL' failed

(deepstream-test4-app:2120): GLib-CRITICAL **: 12:24:32.820: g_strchomp: assertion 'string != NULL' failed
Now playing: ../../../../samples/streams/sample_720p.h264

Using winsys: x11

(deepstream-test4-app:2120): GLib-CRITICAL **: 12:24:32.823: g_strrstr: assertion 'haystack != NULL' failed
ERROR from element nvmsg-broker: Could not configure supporting library.
Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvmsgbroker/gstnvmsgbroker.c(332): gst_nvmsgbroker_start (): /GstPipeline:dstest4-pipeline/GstNvMsgBroker:nvmsg-broker:
unable to connect to broker library
Returned, stopping playback
Deleting pipeline

Then I tweaked the username and password then the app run successfully, showing all bounding boxes and terminal outputs.

I am trying to figure out how can i access those metadata through RabbitMQ Management UI which is running on my local machine.

I followed one tutorial from RabbitMQ github where they created some que and then sent some message and then received it back.

But I don’t know if i have to create a que manually or something else.

Please help me out on this.

Check this sources/libs/amqp_protocol_adaptor/README
part: Test & verify messages published
it should meet your needs.

I had a similar problem, and I shared a sample receiver code, using rabbitmq and python via pika, maybe it can help. With this, you can get the metadata sent from deepstream on any other machine.

@amycao can we use ZMQ with it?

We support amqp, kafka, azure, redis, do not support zmq.
You can use the DeepStream messaging interface, nvds_msgapi , to implement a custom protocol message handler and integrate it with DeepStream applications.

@amycao Thank you for your response.
However, could you provide an example that reads from serial tty device with nvds_msgapi, please?

we are looking to send serial output from /dev/ttyACM0 to Azure IoTusing Deepstream, if possible

duplicated with Message broker to send GPS - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums