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

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

                Author: ASF GitHub Bot
            Created on: 06/Jul/21 15:31
            Start Date: 06/Jul/21 15:31
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3633:
URL: https://github.com/apache/activemq-artemis/pull/3633#discussion_r664663319



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java
##########
@@ -170,15 +215,26 @@ public void sendMessage(Message message, RoutingContext 
context, List<MessageRef
       }
    }
 
-   public static void validateProtocolData(MessageReference ref, SimpleString 
snfAddress) {
+   public static void validateProtocolData(ReferenceIDSupplier 
referenceIDSupplier, MessageReference ref, SimpleString snfAddress) {
       if (ref.getProtocolData() == null && 
!ref.getMessage().getAddressSimpleString().equals(snfAddress)) {
-         setProtocolData(ref);
+         setProtocolData(referenceIDSupplier, ref);
       }
    }
 
-   private static void setProtocolData(MessageReference ref) {
+   private static void setProtocolData(ReferenceIDSupplier 
referenceIDSupplier, MessageReference ref) {
       Map<Symbol, Object> daMap = new HashMap<>();
       DeliveryAnnotations deliveryAnnotations = new DeliveryAnnotations(daMap);
+
+      String brokerID = referenceIDSupplier.getListID(ref);
+
+      // getListID will return null when the message was generated on this 
broker.
+      // on this case we do not send the brokerID, and the ControllerTarget 
will get the information from the link.
+      // this is just to safe a few bytes and some processing on the wire.
+      if (brokerID != null) {
+         // not sending the brokerID, will make the other side to get the 
brokerID from the remote link's property
+         daMap.put(BROKER_ID, brokerID);
+      }

Review comment:
       thanks...
   
   I will mark this as resolved.. just as a way for me to manage the changes.. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 619427)
    Time Spent: 13h 20m  (was: 13h 10m)

> Enhance AMQP Mirror support with dual mirror
> --------------------------------------------
>
>                 Key: ARTEMIS-3243
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3243
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.17.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.18.0
>
>          Time Spent: 13h 20m
>  Remaining Estimate: 0h
>
> at the current Mirror version, we can only mirror into a single direction.
> With this enhancement the two (or more brokers) would be connected to each 
> other, each one having its own ID, and each one would send updates to the 
> other broker.
> The outcome is that if you just transferred producers and consumers from one 
> broker into the other, the fallback would be automatic and simple. No need to 
> disable and enable mirror options.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to