RabbitMQ message sizes

673 views
Skip to first unread message

Shivalika Chaudhary

unread,
Mar 15, 2021, 3:05:43 AM3/15/21
to rabbitmq-users
Hey!
I am using the RabbitMQ C++ client to pass messages between my applications.
I want to measure the size of the actual message being transferred or even total data bytes sent/received by the applications in a session.
I looked at the API docs and the Management UI, but I couldn't find anything.
Please help me with how to measure the same....
Thanks!

Michal Kuratczyk

unread,
Mar 15, 2021, 4:12:36 AM3/15/21
to rabbitm...@googlegroups.com
Hi,

There are metrics related to the number of messages and bytes being transferred so perhaps you can get the average you want from the Prometheus endpoint: https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbitmq_prometheus/metrics.md. You probably need to use per-object metrics (disabled by default): https://www.rabbitmq.com/prometheus.html#metric-aggregation. By the way, in the most recent RabbitMQ versions you don't need to set this parameter - you can scrape /metrics/per-object regardless of what the value of `prometheus.return_per_object_metrics`. Given quite a bit of performance overhead of per-object metrics, assuming you don't need to observe that average size all the time, you can monitor RabbitMQ metrics using /metrics with aggregated metrics only and use /metrics/per-object when you need the details.

Best,

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/3c92cbb8-e2a0-440c-9e24-0146c7218a05n%40googlegroups.com.


--
Michał
RabbitMQ team
Reply all
Reply to author
Forward
0 new messages