[ https://issues.apache.org/jira/browse/ARTEMIS-4579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17824469#comment-17824469 ]
ASF subversion and git services commented on ARTEMIS-4579: ---------------------------------------------------------- Commit 3c580c9351d06969b0062ae6ec5d0104ba36a205 in activemq-artemis's branch refs/heads/main from Jan Šmucr [ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=3c580c9351 ] ARTEMIS-4579 Add `peekFirstMessage*` and `peekFirstScheduledMessage*` functions > Add the *FirstMessage* API for scheduled messages > ------------------------------------------------- > > Key: ARTEMIS-4579 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4579 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: API > Affects Versions: 2.31.2 > Reporter: Jan Šmucr > Priority: Major > Fix For: 2.33.0 > > Time Spent: 3h 40m > Remaining Estimate: 0h > > Alerting on issues with messages not being received properly for a period of > time is an uneasy task. We use the {{getFirstMessageAge()}} command to > trigger alerts in Zabbix, and it works as long as there are no consumers. > But this approach fails when there are consumers repeatedly failing to > receive a message. That message is getting scheduled for redelivery over and > over, and even though there still is an old message in the queue to be > reported, it's no longer visible via {{getFirstMessage*()}} API. > The goal here is to add a set of functions working with messages scheduled > for delivery: > {noformat} > getFirstScheduledMessageAsJSON() > getFirstScheduledMessageTimestamp() > getFirstScheduledMessageAge() > {noformat} > It may be not the most effective approach but it's quite a convenient one, > especially when monitoring a wide set of queues, each with its own set of > alerts. -- This message was sent by Atlassian Jira (v8.20.10#820010)