[jira] [Work logged] (AMQ-9452) StatisticsPlugin - field firstMessageTimestamp is not produced for AuthorizationDestinationFilter
[ https://issues.apache.org/jira/browse/AMQ-9452?focusedWorklogId=909840&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-909840 ] ASF GitHub Bot logged work on AMQ-9452: --- Author: ASF GitHub Bot Created on: 14/Mar/24 08:46 Start Date: 14/Mar/24 08:46 Worklog Time Spent: 10m Work Description: ggkochanski opened a new pull request, #1174: URL: https://github.com/apache/activemq/pull/1174 When dest is instance of DestinationFilter the queue/topic message is not accessed (statistic "firstMessageTimestamp" is not sent) Issue Time Tracking --- Worklog Id: (was: 909840) Remaining Estimate: 0h Time Spent: 10m > 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 >Priority: Major > Time Spent: 10m > 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)
[jira] [Work logged] (AMQ-9452) StatisticsPlugin - field firstMessageTimestamp is not produced for AuthorizationDestinationFilter
[ https://issues.apache.org/jira/browse/AMQ-9452?focusedWorklogId=910098&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910098 ] ASF GitHub Bot logged work on AMQ-9452: --- Author: ASF GitHub Bot Created on: 15/Mar/24 12:14 Start Date: 15/Mar/24 12:14 Worklog Time Spent: 10m Work Description: ggkochanski commented on PR #1174: URL: https://github.com/apache/activemq/pull/1174#issuecomment-1999540269 @mattrpav I've added changes in BrokerStatisticsPluginTest which proves the fix: 1. additional plugin, which just proxes Destination with DestinationFilter: ``` //AMQ-9452: proxy destinations with DestinationFilter plugins[0] = new BrokerPluginSupport() { @Override public Set getDestinations(ActiveMQDestination destination) { return super.getDestinations(destination).stream().map(DestinationFilter::new).collect(Collectors.toSet()); } }; ``` 2. additional assert in test testDestinationStatsWithFirstMessageTimestamp, which proves statistic field firstMessageTimestamp is set by StatisticsBroker: `assertTrue(reply.getLong("firstMessageTimestamp") > 0);` Issue Time Tracking --- Worklog Id: (was: 910098) Time Spent: 20m (was: 10m) > 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 >Priority: Major > Time Spent: 20m > 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)
[jira] [Work logged] (AMQ-9452) StatisticsPlugin - field firstMessageTimestamp is not produced for AuthorizationDestinationFilter
[ https://issues.apache.org/jira/browse/AMQ-9452?focusedWorklogId=910105&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910105 ] ASF GitHub Bot logged work on AMQ-9452: --- Author: ASF GitHub Bot Created on: 15/Mar/24 12:58 Start Date: 15/Mar/24 12:58 Worklog Time Spent: 10m Work Description: jbonofre commented on PR #1174: URL: https://github.com/apache/activemq/pull/1174#issuecomment-1999613459 @ggkochanski Thanks ! I will take a look. Issue Time Tracking --- Worklog Id: (was: 910105) Time Spent: 0.5h (was: 20m) > 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 >Priority: Major > Time Spent: 0.5h > 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)
[jira] [Work logged] (AMQ-9452) StatisticsPlugin - field firstMessageTimestamp is not produced for AuthorizationDestinationFilter
[ https://issues.apache.org/jira/browse/AMQ-9452?focusedWorklogId=910317&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-910317 ] ASF GitHub Bot logged work on AMQ-9452: --- Author: ASF GitHub Bot Created on: 18/Mar/24 12:09 Start Date: 18/Mar/24 12:09 Worklog Time Spent: 10m Work Description: ggkochanski commented on PR #1174: URL: https://github.com/apache/activemq/pull/1174#issuecomment-2003745435 really nice metric (tried patched version in action), I encourage to merge 😊 https://github.com/apache/activemq/assets/8193600/b1ecb6b4-2bae-46bc-9fe3-04f859b5eab8";> Issue Time Tracking --- Worklog Id: (was: 910317) Time Spent: 40m (was: 0.5h) > 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 >Priority: Major > Time Spent: 40m > 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)
[jira] [Work logged] (AMQ-9452) StatisticsPlugin - field firstMessageTimestamp is not produced for AuthorizationDestinationFilter
[ https://issues.apache.org/jira/browse/AMQ-9452?focusedWorklogId=911103&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-911103 ] ASF GitHub Bot logged work on AMQ-9452: --- Author: ASF GitHub Bot Created on: 22/Mar/24 17:34 Start Date: 22/Mar/24 17:34 Worklog Time Spent: 10m Work Description: jbonofre merged PR #1174: URL: https://github.com/apache/activemq/pull/1174 Issue Time Tracking --- Worklog Id: (was: 911103) Time Spent: 50m (was: 40m) > 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)