[
https://issues.apache.org/jira/browse/AMQ-6581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15842934#comment-15842934
]
Richard O'Sullivan commented on AMQ-6581:
-----------------------------------------
Let's change the log message text from "{} received expired message: {}" to
"{} received and discarded an expired message: {}".
Are expired messages ever 'expected'? Perhaps 'tolerated' in some use cases but
'expected' is too lax a word, I believe.
The fact that messages are discarded early on server B from server A creates
two possible escalation paths: 1) "Do we escalate to the Network Engineering
team?" or 2) "Is this a Software Design issue?" In my case, I found the answer
after 4 days of production impact due to the 'DEBUG' log level. I estimate that
using an 'INFO' log level would reduce that time to 2 days, at best, and using
a 'WARN' level would have reduced the impact to 1 day. Many log viewers (I use
Chainsaw) colorize the WARN levels (and above) to quickly focus on the possible
root causes.
If you know of use cases that routinely tolerate the discarding of expired
messages then I defer to your judgment to change the level from DEBUG to INFO
instead of WARN (my preferred level) , as long as you change the text to
include the 'and discarded', too.
Thank you for your consideration and quick response, Christopher.
> Change log level from DEBUG to WARN in ActiveMQMessageConsumer.dequeue(long
> timeout)
> ------------------------------------------------------------------------------------
>
> Key: AMQ-6581
> URL: https://issues.apache.org/jira/browse/AMQ-6581
> Project: ActiveMQ
> Issue Type: Improvement
> Components: JMS client
> Affects Versions: 5.x
> Environment: Camel 'from' endpoint for ActiveMQ component on Linux
> servers (ActiveMQ consumer client)
> Reporter: Richard O'Sullivan
> Priority: Minor
> Labels: easyfix
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Change the log level from DEBUG to WARN in the consumeExpiredMessage block of
> the dequeue(long timeout) method of the ActiveMQMessageConsumer class in the
> org.apache.activemq package.
> Currently, the consumeExpiredMessage block logs "{} received expired message:
> {}" at the DEBUG level when a message is picked from the queue and found to
> be expired. Other than the DEBUG log entry, the message is quietly consumed.
> In a Camel context, the message is not forwarded to the Camel route and the
> message appears to be lost because it is common practice to LOG at INFO or
> above in production environments.
> Proposed, change consumeExpiredMessage to WARN when a message is consumed and
> dropped.
> Rationale: Although, the disposition of expired messages should be an
> occasional occurrence, the expiration may become systematic when a NTP daemon
> fails to operate properly. (This is a real world case that caused a week long
> outage and is the reason for this request). Changing the level to WARN will
> reduce the diagnosis time significantly. When the producer and consumer are
> on different servers and are communicating with a broker over a network, the
> WARN message on the consumer will provide quick evidence that the message
> successfully crossed the network but was consumed (dropped) by the
> consumeExpiredMessage block.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)