[
https://issues.apache.org/jira/browse/ARTEMIS-4558?focusedWorklogId=898781&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-898781
]
ASF GitHub Bot logged work on ARTEMIS-4558:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jan/24 20:52
Start Date: 09/Jan/24 20:52
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #4734:
URL: https://github.com/apache/activemq-artemis/pull/4734#discussion_r1446601359
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##########
@@ -213,15 +215,31 @@ public void deleteQueue(SimpleString address,
SimpleString queue) throws Excepti
if (deleteQueues) {
Message message = createMessage(address, queue, DELETE_QUEUE, null,
queue.toString());
- route(server, message);
+ routeMirrorCommand(server, message);
}
}
+ private boolean invalidTarget(MirrorController controller, Message message)
{
+ if (controller == null) {
+ return false;
+ }
+ String remoteID = getRemoteMirrorId();
+ if (remoteID == null) {
+ // This is to avoid a reflection from a small period of time one node
reconnects but not the opposite direction
+ remoteID =
String.valueOf(message.getAnnotation(BROKER_ID_SIMPLE_STRING));
+ logger.debug("Remote link is not initialized yet, setting remoteID
from message as {}", remoteID);
+ }
+ return sameNode(remoteID, controller.getRemoteMirrorId());
+ }
+
private boolean invalidTarget(MirrorController controller) {
return controller != null && sameNode(getRemoteMirrorId(),
controller.getRemoteMirrorId());
}
private boolean ignoreAddress(SimpleString address) {
+ if
(address.startsWith(server.getConfiguration().getManagementAddress())) {
+ return true;
+ }
Review Comment:
I would prefer if we keep this one together. It's part of the same tests.
some of the messages were leaking to other nodes in cluster.
Issue Time Tracking
-------------------
Worklog Id: (was: 898781)
Time Spent: 50m (was: 40m)
> 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: 50m
> 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)