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

ASF GitHub Bot logged work on ARTEMIS-4558:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jan/24 02:20
            Start Date: 10/Jan/24 02:20
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4734:
URL: https://github.com/apache/activemq-artemis/pull/4734#discussion_r1446811859


##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##########
@@ -609,10 +600,22 @@ private Message createMessage(SimpleString address, 
SimpleString queue, Object e
       return 
AMQPMirrorMessageFactory.createMessage(snfQueue.getAddress().toString(), 
address, queue, event, brokerID, body, ackReason);
    }
 
-   public static void route(ActiveMQServer server, Message message) throws 
Exception {
+   public static void routeMirrorCommand(ActiveMQServer server, Message 
message) throws Exception {
+      message.setMessageID(server.getStorageManager().generateID());
+      RoutingContext ctx = mirrorControlRouting.get();
+      // it is important to use local only at the source to avoid having the 
message strictly load balancing
+      // to other nodes if the SNF queue has the same name as the one on this 
node.
+      
ctx.clear().setMirrorOption(MirrorOption.disabled).setLoadBalancingType(MessageLoadBalancingType.LOCAL_ONLY);
+      server.getPostOffice().route(message, ctx, false);
+   }

Review Comment:
   thanks for pointing that out.. During my hacking I had a few versions where 
I was using a different route Method. As it stands I missed simplifying at the 
end.. thanks





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

    Worklog Id:     (was: 898836)
    Time Spent: 1h 20m  (was: 1h 10m)

> AMQP Mirror ACKS should be idempotent
> -------------------------------------
>
>                 Key: ARTEMIS-4558
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4558
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.32.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> When I first developed Mirroring, I assumed sending the mirrored ACK on a 
> aferACK and disconnected from any other transactions would be enough, with 
> the caveat you could get a duplicate delivery on the target mirror in case of 
> failures.
> I got some complains that this is not safe enough from some users, and I'm 
> making this now idempotent.
> I took an overal mirroring hardening approach and I'm improving test coverage 
> for this improvement.



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

Reply via email to