You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/11/03 16:34:00 UTC

[jira] [Work logged] (AMQ-9157) Add a new advisory type for dispatched messages

     [ https://issues.apache.org/jira/browse/AMQ-9157?focusedWorklogId=823133&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-823133 ]

ASF GitHub Bot logged work on AMQ-9157:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Nov/22 16:33
            Start Date: 03/Nov/22 16:33
    Worklog Time Spent: 10m 
      Work Description: mattrpav commented on code in PR #929:
URL: https://github.com/apache/activemq/pull/929#discussion_r1013144571


##########
activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java:
##########
@@ -526,10 +526,7 @@ public void isFull(ConnectionContext context, Destination destination, Usage<?>
     @Override
     public void messageConsumed(ConnectionContext context, MessageReference messageReference) {
         if (isLogAll() || isLogConsumerEvents() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";

Review Comment:
   Good clean-up =)



##########
activemq-broker/src/main/java/org/apache/activemq/broker/util/LoggingBrokerPlugin.java:
##########
@@ -538,22 +535,25 @@ public void messageConsumed(ConnectionContext context, MessageReference messageR
     @Override
     public void messageDelivered(ConnectionContext context, MessageReference messageReference) {
         if (isLogAll() || isLogConsumerEvents() || isLogInternalEvents()) {
-            String msg = "Unable to display message.";
-
-            msg = messageReference.getMessage().toString();
-
+            String msg = messageReference.getMessage().toString();

Review Comment:
   Good clean-up =)





Issue Time Tracking
-------------------

            Worklog Id:     (was: 823133)
    Remaining Estimate: 0h
            Time Spent: 10m

> Add a new advisory type for dispatched messages
> -----------------------------------------------
>
>                 Key: AMQ-9157
>                 URL: https://issues.apache.org/jira/browse/AMQ-9157
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 5.17.2
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>             Fix For: 5.18.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I have a use case where it would be useful for advisory messages to be (optionally) turned on for dispatched messages. There is currently an advisory for messages that have been consumed (acknowledged) but not for the dispatch before the acknowledge.
> I will be adding a new hook to the broker API to do this so that it follows the same pattern as the other advisories such as delivered and consumed advisories. The existing methods for pre/post processing dispatch are called from the TransportConnection but the advisory logic should be called from the subscriptions themselves on dispatch so that things like the connection context can be easily passed and to better decide when to call it (such as not calling for the Queue NULL_MESSAGE type). 
> There will be a new policy entry flag called {{advisoryForDispatched}} that will be off by default.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)