# Query Maximum RabbitMQ Message Count Using DQL

**URL:** <https://community.dynatrace.com/t/query-maximum-rabbitmq-message-count-using-dql/52524>\
**Category:** DQL\
**Tags:** dql\
**Created:** [July 16, 2025, 10:00pm UTC](https://community.dynatrace.com/t/query-maximum-rabbitmq-message-count-using-dql/52524 "2025-07-16T22:00:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonwu42195](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@simonwu42195](https://community.dynatrace.com/u/simonwu42195)\
**Post date:** [July 16, 2025, 10:00pm UTC](https://community.dynatrace.com/t/query-maximum-rabbitmq-message-count-using-dql/52524/1 "2025-07-16T22:00:09Z")

</div>

Currently we have a DQL query running in workflow for checking the max value of one of the rabbitmq queues from 22:00 to 23:59 and send us alert if the max value is lower than the threshold. The workflow running in the midnight.

timeseries ready = max(rabbitmq.queue.messages\_ready),  
by:{queue}, from:now()-2h, to:now()  
| fields readyMax = round(arrayMax(ready), decimals: 0), queue  
| filter queue == “Dialler.DecisionTrigger2”

Now we would like to have some analysis for the rabbitmq result. We would like to make a summary for the max value of rabbitmq messages from 22:00 to 23:59 for last 3 months by each day as a table format as below:

|Date | max value|  
|2025-7-1| 115k|  
|2025-7-2| 35k|  
|2025-7-3| 60k|  
|2025-7-4| 95k|  
|2025-7-5| 55k|  
…

However, we are not familiar to expand the above DQL query including the time filtering and summary part. any help will be appreciated.

---

<div class="post-metadata">

**Author:** ![simonwu42195](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@simonwu42195](https://community.dynatrace.com/u/simonwu42195)\
**Post date:** [July 18, 2025, 5:32pm UTC](https://community.dynatrace.com/t/query-maximum-rabbitmq-message-count-using-dql/52524/2 "2025-07-18T17:32:35Z")

</div>

I have slightly modified the dql query for extracting that data that I need, and then extract to csv, add the filtering for the report that I want. Not sure if there is better way to do so.

timeseries value = max(rabbitmq.queue.messages), interval: 1h,  
by:{queue}  
// \*\*\* timeseries interval splitter start \*\*\*  
| fields queue, timeslot=record(  
timeframe.start = timeframe[start] + interval \* iIndex(),  
value[]  
/\* add any dimension split (by:) field names here \*/

)  
| filter queue == “Dialler.DecisionTrigger2”  
//| filter getHour(timeframe[start]) \>= 19  
| expand timeslot  
| fieldsFlatten timeslot  
| fieldsRemove timeslot

---

<div class="post-metadata">

**Author:** ![simonwu42195](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@simonwu42195](https://community.dynatrace.com/u/simonwu42195)\
**Post date:** [July 18, 2025, 5:34pm UTC](https://community.dynatrace.com/t/query-maximum-rabbitmq-message-count-using-dql/52524/3 "2025-07-18T17:34:06Z")

</div>

![Annotation 2025-07-18 183309.jpg](https://global.discourse-cdn.com/dynatrace/original/2X/b/be6c0276bd28956dcd5fc876161af2c199bfc658.jpeg)

---

<div class="post-metadata">

**Author:** ![izabelarokita](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/izabelarokita/32/41812_2.png) [@izabelarokita](https://community.dynatrace.com/u/izabelarokita)\
**Post date:** [December 17, 2025, 1:47pm UTC](https://community.dynatrace.com/t/query-maximum-rabbitmq-message-count-using-dql/52524/4 "2025-12-17T13:47:04Z")

</div>

Hey&nbsp;[@simonwu42195](https://community.dynatrace.com/user/90493)&nbsp;,  
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&nbsp;:blush:  
Please let me know what works best for you.
