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

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

                Author: ASF GitHub Bot
            Created on: 23/Jul/21 21:53
            Start Date: 23/Jul/21 21:53
    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_r675883566



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java
##########
@@ -340,7 +344,19 @@ protected void remoteLinkOpened(Link link) throws 
Exception {
    }
 
    private boolean isReplicaTarget(Link link) {
-      return link != null && link.getTarget() != null && 
link.getTarget().getAddress() != null && 
link.getTarget().getAddress().equals(ProtonProtocolManager.MIRROR_ADDRESS);
+      boolean hasMirror = false;
+
+      Terminus terminus = (Terminus)link.getTarget();
+      if (terminus != null && terminus.getCapabilities() != null) {
+         for (Symbol s : terminus.getCapabilities()) {
+            if (s.equals(AMQPMirrorControllerSource.MIRROR_CAPABILITY)) {
+               hasMirror = true;
+               break;
+            }
+         }
+      }

Review comment:
       to make my life easier when I'm writing docs (and for users to 
understand it better), I made the SNF and the link names match.
   
   So, now the broker is accumulating messages for the mirror into 
$ACTIVEMQ_ARTEMIS_MIRROR_<connection_name> 
   
   and the link where it connects to is the same name.
   
   that way I don't need to make a distinction on target addresses or anything. 
I can just mention what address is used as an intermediate to send messages 
towards the other broker, and everything else falls in place logically. 
   
   (why I didn't see this before I don't know.. but it's always easier to blame 
yourself in retrospect :) )




-- 
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: 627324)
    Time Spent: 28h 40m  (was: 28.5h)

> 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: 28h 40m
>  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