Grzegorz Kochański created AMQ-9452:
---------------------------------------
Summary: StatisticsPlugin - field firstMessageTimestamp is not
produced for AuthorizationDestinationFilter
Key: AMQ-9452
URL: https://issues.apache.org/jira/browse/AMQ-9452
Project: ActiveMQ Classic
Issue Type: Bug
Components: Broker
Affects Versions: 5.18.3
Reporter: Grzegorz Kochański
{{StatisticsBroker}} does not send field {{firstMessageTimestamp}} as dest may
be instance of {{DestinationFilter}} (in my case:
{{{}AuthorizationDestinationFilter{}}})
{code:java}
if (includeFirstMessageTimestamp) {
if (dest instanceof Queue) {
((Queue) dest).doBrowse(tempFirstMessage, 1);
}
else if (dest instanceof Topic) {
((Topic) dest).doBrowse(tempFirstMessage, 1);
}
if (!tempFirstMessage.isEmpty()) {
Message message = tempFirstMessage.get(0);
// NOTICE: Client-side, you may get the broker "now" Timestamp by
msg.getJMSTimestamp()
// This allows for calculating age.
statsMessage.setLong("firstMessageTimestamp",
message.getBrokerInTime());
tempFirstMessage.clear();
} {code}
It appears that {{BaseDestination}} may be easily unwinded:
{code:java}
//unwind BaseDestination
while (dest instanceof DestinationFilter) {
dest = ((DestinationFilter) dest).getNext();
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)