[
https://issues.apache.org/jira/browse/AMQ-9452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830204#comment-17830204
]
ASF subversion and git services commented on AMQ-9452:
------------------------------------------------------
Commit 3b0a646af24cef2335f8a7c9a48332dc5bcf6bb5 in activemq's branch
refs/heads/activemq-5.18.x from Grzegorz Kochanski
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=3b0a646af ]
AMQ-9452: unwrap BaseDestination to access queue/topic message
Change-Id: Ic05002ecb428e2aa5abeb9dc3e499e3aae550051
(cherry picked from commit 4d40023968fc334982f15e9c9623b1d74d308931)
> 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
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 5.18.4, 5.17.7, 6.1.1
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> {{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 unwinded:
> {code:java}
> //unwind BaseDestination
> while (dest instanceof DestinationFilter) {
> dest = ((DestinationFilter) dest).getNext();
> }
> {code}
>
>
> related to feature:
> https://github.com/apache/activemq/commit/9167a79b79e4c121cfe0a5b82456f52bf3ecc3c7
--
This message was sent by Atlassian Jira
(v8.20.10#820010)