AMQP message throughput

I have five camera streams on 30 fps, publishing for each image a message on the AMQP broker.
The expected throughput would be 150 msg/sec, but unforunately it reaches only up to 93 msg/sec. I verified that the asynchronous send is executed in the broker plugin (self->nvds_msgapi_send_async).

Furthermore I checked in which rate the function nvds_msgapi_send_async() in gst_nvmsgbroker_render() is called. It is very exactly 150/s. So I can exclude, that anything before is causing the delay.

When I lower the fps to for example 6, I get the expected 5*6=35 msg/sec on the broker.

I built a quick example in python, that sends the the same message size to rabbitmq and there I can easily reach a throughput of 150 msg/sec, even more.

The message is not big. Here and example:

json_sample =  {
        "version": 1,
        "sensorId": 0,
        "frame_id": 122,
        "frame_width": 1280,
        "fram_height": 720,
        "objects": [],
        "stamp": {"secs": 12222222, "nsecs": 12222222}

Do you have any idea, why the throughput is so bad?

I would appreciate some feedback.

The reason for the restricted throughput lays in gstnvmsgbroker.c in function gst_nvmsgbroker_do_work(). For a higher throughtput, the sleep-time in the while-loop has to be reduced.

Hi rog07o4z, thank you for sharing!