简体   繁体   中英

Monitoring Broker Redelivery with ActiveMQ

We have configured our ActiveMQ Broker with the Broker redelivery Plugin using this configuration.

<redeliveryPlugin fallbackToDeadLetter="true"
                sendToDlqIfMaxRetriesExceeded="true">
    <redeliveryPolicyMap>
        <redeliveryPolicyMap>
            <redeliveryPolicyEntries>
            </redeliveryPolicyEntries>
            <!-- the fallback policy for all other destinations -->
            <defaultEntry>
                <redeliveryPolicy
                    maximumRedeliveries="15"
                    useExponentialBackOff="true"
                    initialRedeliveryDelay="5000"
                    useCollisionAvoidance="true"
                    backOffMultiplier="5"
                    maximumRedeliveryDelay="93600000" />
            </defaultEntry>
        </redeliveryPolicyMap>
    </redeliveryPolicyMap>
</redeliveryPlugin>

The plugin performs as expected removing the failed message from the queue and retrying it at the specified intervals.

The problem we now face is that we need to monitor how many message are currently waiting to be retried for each queue, since they will not show up as waiting in the normal queue monitoring. I could not find anything in the JMX tree for ActiveMQ related to the redeliveryPlugin.

The messages are stored in the JobSchedulerStore which is a separate store from the normal AMQ KahaDB or JDBC stores. There's less visibility into this store however there should be an MBean for it. You can get some information via JMX or you can get information by sending JMS Messages with special headers set. There is an article on the JMS style administration here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM