[jira] [Updated] (ARTEMIS-4249) Failure to create internal MQTT consumer can orphan subscription queue

2023-04-21 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-4249:

Description: When an MQTT client subscribes to a topic the broker 
internally creates a subscription queue on the corresponding address and then 
creates a consumer on that queue to receive the messages and relay them back to 
the MQTT client. If, for some reason, adding the consumer to the queue fails 
then the subscription queue will be orphaned. It will then accumulate messages 
and consume broker resources.

> Failure to create internal MQTT consumer can orphan subscription queue
> --
>
> Key: ARTEMIS-4249
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4249
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
> Fix For: 2.29.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When an MQTT client subscribes to a topic the broker internally creates a 
> subscription queue on the corresponding address and then creates a consumer 
> on that queue to receive the messages and relay them back to the MQTT client. 
> If, for some reason, adding the consumer to the queue fails then the 
> subscription queue will be orphaned. It will then accumulate messages and 
> consume broker resources.



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


[jira] [Resolved] (ARTEMIS-4249) Failure to create internal MQTT consumer can orphan subscription queue

2023-04-21 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram resolved ARTEMIS-4249.
-
Fix Version/s: 2.29.0
   Resolution: Fixed

> Failure to create internal MQTT consumer can orphan subscription queue
> --
>
> Key: ARTEMIS-4249
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4249
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
> Fix For: 2.29.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:39
Start Date: 21/Apr/23 20:39
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174147176


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -357,6 +364,13 @@ private static void setProtocolData(MessageReference ref, 
String brokerID, long
 daMap.put(INTERNAL_DESTINATION, ref.getMessage().getAddress());
  }
   }
+
+  if (routingContext != null && routingContext.isMirrorIndividualRoute()) {
+ ArrayList queues = new ArrayList<>();
+ routingContext.forEachDurable(q -> 
queues.add(String.valueOf(q.getName(;
+ daMap.put(TARGET_QUEUES, queues);
+  }

Review Comment:
   I would need to test on an impossible situation. That is an artificial 
operation routing to a local non durable queue. 
   
   Clustered routings will always happen after durable queues.





Issue Time Tracking
---

Worklog Id: (was: 858511)
Time Spent: 3h 10m  (was: 3h)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:34
Start Date: 21/Apr/23 20:34
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174143682


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -76,14 +77,20 @@ public class AMQPMirrorControllerSource extends 
BasicMirrorController im
public static final Symbol INTERNAL_ID = 
Symbol.getSymbol("x-opt-amq-mr-id");
public static final Symbol INTERNAL_DESTINATION = 
Symbol.getSymbol("x-opt-amq-mr-dst");
 
+   /** When a clustered node (from regular cluster connections) receives a 
message
+   it will have target queues associated with it
+  this could be from message redistribution or simply load balancing.
+  an that case this will have the queue associated with it */
+   public static final Symbol TARGET_QUEUES = 
Symbol.getSymbol("x-opt-amq-trg-q");
+
// Capabilities
public static final Symbol MIRROR_CAPABILITY = 
Symbol.getSymbol("amq.mirror");
public static final Symbol QPID_DISPATCH_WAYPOINT_CAPABILITY = 
Symbol.valueOf("qd.waypoint");
 
public static final SimpleString INTERNAL_ID_EXTRA_PROPERTY = 
SimpleString.toSimpleString(INTERNAL_ID.toString());
public static final SimpleString INTERNAL_BROKER_ID_EXTRA_PROPERTY = 
SimpleString.toSimpleString(BROKER_ID.toString());
 
-   private static final ThreadLocal mirrorControlRouting = 
ThreadLocal.withInitial(() -> new 
RoutingContextImpl(null).setMirrorDisabled(true));
+   private static final ThreadLocal mirrorControlRouting = 
ThreadLocal.withInitial(() -> new 
RoutingContextImpl(null).setMirrorOption(MirrorOption.disabled));

Review Comment:
   This is actually what it is... controlling what's the outcome of Mirroring.. 
   in the case Routing will produce no mirroring. which is exactly what's being 
set here.





Issue Time Tracking
---

Worklog Id: (was: 858510)
Time Spent: 3h  (was: 2h 50m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:32
Start Date: 21/Apr/23 20:32
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174142957


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -357,6 +364,13 @@ private static void setProtocolData(MessageReference ref, 
String brokerID, long
 daMap.put(INTERNAL_DESTINATION, ref.getMessage().getAddress());
  }
   }
+
+  if (routingContext != null && routingContext.isMirrorIndividualRoute()) {
+ ArrayList queues = new ArrayList<>();
+ routingContext.forEachDurable(q -> 
queues.add(String.valueOf(q.getName(;
+ daMap.put(TARGET_QUEUES, queues);
+  }

Review Comment:
   sending it empty wouldn't be wrong.
   
   The only scenario where this could happen is if the queue was removed in 
flight... 
   
   Test this will be a bit complicated though.





Issue Time Tracking
---

Worklog Id: (was: 858509)
Time Spent: 2h 50m  (was: 2h 40m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:15
Start Date: 21/Apr/23 20:15
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174130853


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MirrorOption.java:
##
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+/** This is to be used in conjunction with RoutingContext, where we control 
certain semantics during routing.
+ *  */
+public enum MirrorOption {

Review Comment:
   I prefer it as a separate class to be honest.
   
   the name Control to me implies it's doing control.. in this case it's just 
really an option on what is the outcome of Mirroring at the current Routing.





Issue Time Tracking
---

Worklog Id: (was: 858507)
Time Spent: 2h 40m  (was: 2.5h)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:09
Start Date: 21/Apr/23 20:09
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174127464


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java:
##
@@ -577,6 +599,9 @@ private String debugBindings() {
private void routeFromCluster(final Message message,
  final RoutingContext context,
  final byte[] ids) throws Exception {
+  if (!context.isMirrorDisabled()) {
+ context.setMirrorOption(MirrorOption.individualRoute);
+  }

Review Comment:
   ServerSessionImpl will reuse the context over and over. If this individual 
is set, it must be reset before the next session.send





Issue Time Tracking
---

Worklog Id: (was: 858506)
Time Spent: 2.5h  (was: 2h 20m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:08
Start Date: 21/Apr/23 20:08
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174126520


##
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPRedistributeClusterTest.java:
##
@@ -0,0 +1,454 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.tests.integration.amqp.connect;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+import org.apache.activemq.artemis.api.core.Message;
+import org.apache.activemq.artemis.api.core.QueueConfiguration;
+import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration;
+import org.apache.activemq.artemis.core.config.CoreAddressConfiguration;
+import 
org.apache.activemq.artemis.core.config.amqpBrokerConnectivity.AMQPBrokerConnectConfiguration;
+import 
org.apache.activemq.artemis.core.config.amqpBrokerConnectivity.AMQPMirrorBrokerConnectionElement;
+import org.apache.activemq.artemis.core.config.ha.LiveOnlyPolicyConfiguration;
+import org.apache.activemq.artemis.core.message.impl.CoreMessage;
+import org.apache.activemq.artemis.core.postoffice.QueueBinding;
+import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
+import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.MirrorOption;
+import org.apache.activemq.artemis.core.server.Queue;
+import org.apache.activemq.artemis.core.server.RoutingContext;
+import org.apache.activemq.artemis.core.server.cluster.RemoteQueueBinding;
+import 
org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
+import 
org.apache.activemq.artemis.core.server.cluster.impl.RemoteQueueBindingImpl;
+import org.apache.activemq.artemis.core.server.impl.RoutingContextImpl;
+import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
+import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
+import org.apache.activemq.artemis.logs.AssertionLoggerHandler;
+import org.apache.activemq.artemis.tests.integration.amqp.AmqpTestSupport;
+import org.apache.activemq.artemis.tests.util.CFUtil;
+import org.apache.activemq.artemis.utils.Wait;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AMQPRedistributeClusterTest extends AmqpTestSupport {
+
+   private static final Logger logger = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+   private static final String QUEUE_NAME = "REDIST_QUEUE";
+   private static final String TOPIC_NAME = "REDIST_TOPIC";
+   private static final SimpleString TOPIC_NAME_SIMPLE_STRING = 
SimpleString.toSimpleString("REDIST_TOPIC");
+
+   protected static final int A_1_PORT = 5673;
+   protected static final int A_2_PORT = 5674;
+
+   ActiveMQServer a1;
+   ActiveMQServer a2;
+
+   protected static final int B_1_PORT = 5773;
+   protected static final int B_2_PORT = 5774;
+
+   ActiveMQServer b1;
+   ActiveMQServer b2;
+
+   @Before
+   public void setCluster() throws Exception {
+  a1 = createClusteredServer("A_1", A_1_PORT, A_2_PORT, B_1_PORT);
+  a2 = createClusteredServer("A_2", A_2_PORT, A_1_PORT, B_2_PORT);
+
+  a1.start();
+  a2.start();
+
+  b1 = createClusteredServer("B_1", B_1_PORT, B_2_PORT, -1);
+   

[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 20:01
Start Date: 21/Apr/23 20:01
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174122204


##
tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java:
##
@@ -464,6 +465,21 @@ public void 
setMessageLoadBalancingType(MessageLoadBalancingType messageLoadBala
 
   }
 
+  @Override
+  public Binding getBinding(String name) {
+ return null;

Review Comment:
   that's not really needed, but ok.





Issue Time Tracking
---

Worklog Id: (was: 858504)
Time Spent: 2h 10m  (was: 2h)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 19:19
Start Date: 21/Apr/23 19:19
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174094495


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MirrorOption.java:
##
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+/** This is to be used in conjunction with RoutingContext, where we control 
certain semantics during routing.
+ *  */
+public enum MirrorOption {

Review Comment:
   I had it nestes at first. But then the syntax got better in other usages. 
   
   The way I see this is, it is controlling how Mirror happens after routing. 





Issue Time Tracking
---

Worklog Id: (was: 858503)
Time Spent: 2h  (was: 1h 50m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:38
Start Date: 21/Apr/23 18:38
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174066387


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MirrorOption.java:
##
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+/** This is to be used in conjunction with RoutingContext, where we control 
certain semantics during routing.
+ *  */
+public enum MirrorOption {

Review Comment:
   Even just nesting it in RoutingContext would seem nicer. 
RoutingContext.MirrorControl{enabled, disabled, individual}?





Issue Time Tracking
---

Worklog Id: (was: 858501)
Time Spent: 1h 50m  (was: 1h 40m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:32
Start Date: 21/Apr/23 18:32
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174062204


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java:
##
@@ -707,6 +708,10 @@ public QueueImpl(final QueueConfiguration 
queueConfiguration,
 
   this.server = server;
 
+  if (queueConfiguration.isInternal()) {
+ this.internalQueue = queueConfiguration.isInternal();
+  }

Review Comment:
   The field is a boolean though?





Issue Time Tracking
---

Worklog Id: (was: 858499)
Time Spent: 1h 40m  (was: 1.5h)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:31
Start Date: 21/Apr/23 18:31
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174061378


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MirrorOption.java:
##
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+/** This is to be used in conjunction with RoutingContext, where we control 
certain semantics during routing.
+ *  */
+public enum MirrorOption {

Review Comment:
   I only see this being used to set a toggle on RoutingContext? A 
'MirrorOption' enum sitting at the root of the server package tree, would to me 
most typicaly suggest its about setting options for the Mirror itself. This 
isnt, its about controlling RoutingContext behaviour. MirrorOption is perhaps 
the last name I would give it from how I see it being used.





Issue Time Tracking
---

Worklog Id: (was: 858498)
Time Spent: 1.5h  (was: 1h 20m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:25
Start Date: 21/Apr/23 18:25
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174056084


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -357,6 +364,13 @@ private static void setProtocolData(MessageReference ref, 
String brokerID, long
 daMap.put(INTERNAL_DESTINATION, ref.getMessage().getAddress());
  }
   }
+
+  if (routingContext != null && routingContext.isMirrorIndividualRoute()) {
+ ArrayList queues = new ArrayList<>();
+ routingContext.forEachDurable(q -> 
queues.add(String.valueOf(q.getName(;
+ daMap.put(TARGET_QUEUES, queues);
+  }

Review Comment:
   So it should send the empty list if there are no durable queues? Or does 
that mean it shouldnt even send the message?





Issue Time Tracking
---

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

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:11
Start Date: 21/Apr/23 18:11
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174046217


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MirrorOption.java:
##
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+/** This is to be used in conjunction with RoutingContext, where we control 
certain semantics during routing.
+ *  */
+public enum MirrorOption {

Review Comment:
   this is for the Mirror option , there's an interface in the broker... it's 
either disable... I don't think we can give another name.





Issue Time Tracking
---

Worklog Id: (was: 858494)
Time Spent: 1h  (was: 50m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:11
Start Date: 21/Apr/23 18:11
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174046495


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java:
##
@@ -707,6 +708,10 @@ public QueueImpl(final QueueConfiguration 
queueConfiguration,
 
   this.server = server;
 
+  if (queueConfiguration.isInternal()) {
+ this.internalQueue = queueConfiguration.isInternal();
+  }

Review Comment:
   not really... it will be null otherwise.





Issue Time Tracking
---

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

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 18:09
Start Date: 21/Apr/23 18:09
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1174044880


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -357,6 +364,13 @@ private static void setProtocolData(MessageReference ref, 
String brokerID, long
 daMap.put(INTERNAL_DESTINATION, ref.getMessage().getAddress());
  }
   }
+
+  if (routingContext != null && routingContext.isMirrorIndividualRoute()) {
+ ArrayList queues = new ArrayList<>();
+ routingContext.forEachDurable(q -> 
queues.add(String.valueOf(q.getName(;
+ daMap.put(TARGET_QUEUES, queues);
+  }

Review Comment:
   non durable queues are not passed along on clustering. this is just for 
durable really.
   
   The Mirror Individual Route is to avoid sending a message to an entire fan 
out when clustering redistribution happens.
   
   Say you had a clustered message redistribution from one particular queue to 
another queue... which is a clustering operation. in that case we need to pass 
to the specific queues.





Issue Time Tracking
---

Worklog Id: (was: 858493)
Time Spent: 50m  (was: 40m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Work logged] (ARTEMIS-4249) Failure to create internal MQTT consumer can orphan subscription queue

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 17:32
Start Date: 21/Apr/23 17:32
Worklog Time Spent: 10m 
  Work Description: jbertram merged PR #:
URL: https://github.com/apache/activemq-artemis/pull/




Issue Time Tracking
---

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

> Failure to create internal MQTT consumer can orphan subscription queue
> --
>
> Key: ARTEMIS-4249
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4249
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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


[jira] [Commented] (ARTEMIS-4249) Failure to create internal MQTT consumer can orphan subscription queue

2023-04-21 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715106#comment-17715106
 ] 

ASF subversion and git services commented on ARTEMIS-4249:
--

Commit fde9d223aeff198b1d6529d7457a732606112f11 in activemq-artemis's branch 
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=fde9d223ae ]

ARTEMIS-4249 failure to create internal MQTT consumer can orphan sub q


> Failure to create internal MQTT consumer can orphan subscription queue
> --
>
> Key: ARTEMIS-4249
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4249
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 17:30
Start Date: 21/Apr/23 17:30
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443#discussion_r1173948572


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java:
##
@@ -577,6 +599,9 @@ private String debugBindings() {
private void routeFromCluster(final Message message,
  final RoutingContext context,
  final byte[] ids) throws Exception {
+  if (!context.isMirrorDisabled()) {
+ context.setMirrorOption(MirrorOption.individualRoute);
+  }

Review Comment:
   Why? Where is this reset?



##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -357,6 +364,13 @@ private static void setProtocolData(MessageReference ref, 
String brokerID, long
 daMap.put(INTERNAL_DESTINATION, ref.getMessage().getAddress());
  }
   }
+
+  if (routingContext != null && routingContext.isMirrorIndividualRoute()) {
+ ArrayList queues = new ArrayList<>();
+ routingContext.forEachDurable(q -> 
queues.add(String.valueOf(q.getName(;
+ daMap.put(TARGET_QUEUES, queues);
+  }

Review Comment:
   Why does it only look at durable queues?
   
   What if there are none? Should it actually be sending an empty list as it 
seems it will?
   
   (Also, what is a 'MirrorIndividualRoute'?)
   



##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerSource.java:
##
@@ -76,14 +77,20 @@ public class AMQPMirrorControllerSource extends 
BasicMirrorController im
public static final Symbol INTERNAL_ID = 
Symbol.getSymbol("x-opt-amq-mr-id");
public static final Symbol INTERNAL_DESTINATION = 
Symbol.getSymbol("x-opt-amq-mr-dst");
 
+   /** When a clustered node (from regular cluster connections) receives a 
message
+   it will have target queues associated with it
+  this could be from message redistribution or simply load balancing.
+  an that case this will have the queue associated with it */
+   public static final Symbol TARGET_QUEUES = 
Symbol.getSymbol("x-opt-amq-trg-q");

Review Comment:
   Last sentence of the javadoc (should that be a comment?) is a bit broken.
   
   Is this mirroring specific? Its defined in a mirroring class, and seemingly 
only referenced in others, suggesting so...if so, should it start 
"x-opt-amq-mr-" like all the other mirroring related key names.



##
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MirrorOption.java:
##
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.server;
+
+/** This is to be used in conjunction with RoutingContext, where we control 
certain semantics during routing.
+ *  */
+public enum MirrorOption {

Review Comment:
   This can never realistically carry any other 'mirror options' so that name 
really doesnt seem to fit well. As the comment says, it just a routing control 
really. RoutingContextMirrorControl?
   



##
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPRedistributeClusterTest.java:
##
@@ -0,0 +1,454 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy 

[jira] [Created] (ARTEMIS-4249) Failure to create internal MQTT consumer can orphan subscription queue

2023-04-21 Thread Justin Bertram (Jira)
Justin Bertram created ARTEMIS-4249:
---

 Summary: Failure to create internal MQTT consumer can orphan 
subscription queue
 Key: ARTEMIS-4249
 URL: https://issues.apache.org/jira/browse/ARTEMIS-4249
 Project: ActiveMQ Artemis
  Issue Type: Bug
Reporter: Justin Bertram
Assignee: Justin Bertram






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


[jira] [Commented] (ARTEMIS-4248) Fix PagingTest::testSimpleResume

2023-04-21 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715059#comment-17715059
 ] 

ASF subversion and git services commented on ARTEMIS-4248:
--

Commit 9bac93e25eaead24d357c063e0621cbb7e22692f in activemq-artemis's branch 
refs/heads/main from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=9bac93e25e ]

ARTEMIS-4248 Fixing PagingTest::testSimpleResume

testSimpleResume is intermittently failing.
This test is forcing another page, while cleanup is happening on the background.
ForceAnotherPage may not put the address back into paging if this happened 
right after the cleanup call.
To fix the test, we should call startPaging after forceAnotherPage is called.


> Fix PagingTest::testSimpleResume
> 
>
> Key: ARTEMIS-4248
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4248
> Project: ActiveMQ Artemis
>  Issue Type: Test
>Reporter: Clebert Suconic
>Priority: Major
> Fix For: 2.29.0
>
>
> testSimpleResume is intermittently failing.
> This test is forcing another page, while cleanup is happening on the 
> background.
> ForceAnotherPage may not put the address back into paging if this happened 
> right after the cleanup call.
> To fix the test, we should call startPaging after forceAnotherPage is called.



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


[jira] [Work logged] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 15:30
Start Date: 21/Apr/23 15:30
Worklog Time Spent: 10m 
  Work Description: jbertram merged PR #4443:
URL: https://github.com/apache/activemq-artemis/pull/4443




Issue Time Tracking
---

Worklog Id: (was: 858474)
Time Spent: 0.5h  (was: 20m)

> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Commented] (ARTEMIS-4247) Inconsistencies between AMQP Mirror and Artemis Clustering

2023-04-21 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17715058#comment-17715058
 ] 

ASF subversion and git services commented on ARTEMIS-4247:
--

Commit 2a81a0a3c604b37488694fdb7833404a201c85db in activemq-artemis's branch 
refs/heads/main from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=2a81a0a3c6 ]

ARTEMIS-4247 Inconsistencies between Broker Clustering and AMQP Mirror

- activemq.notifications are being transferred to the target node, unless an 
ignore is setup
- topics are being duplicated after redistribution
- topics sends are being duplicated when a 2 node cluster mirrors to another 2 
node cluster, and both nodes are mirrored.


> Inconsistencies between AMQP Mirror and Artemis Clustering
> --
>
> Key: ARTEMIS-4247
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4247
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Clebert Suconic
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> - activemq.notifications are being transferred to the target node, unless an 
> ignore is setup
> - topics are being duplicated after redistribution
> - topics sends are being duplicated when a 2 node cluster mirrors to another 
> 2 node cluster, and both nodes are mirrored. 



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


[jira] [Updated] (ARTEMIS-4248) Fix PagingTest::testSimpleResume

2023-04-21 Thread Clebert Suconic (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clebert Suconic updated ARTEMIS-4248:
-
Fix Version/s: 2.29.0

> Fix PagingTest::testSimpleResume
> 
>
> Key: ARTEMIS-4248
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4248
> Project: ActiveMQ Artemis
>  Issue Type: Test
>Reporter: Clebert Suconic
>Priority: Major
> Fix For: 2.29.0
>
>
> testSimpleResume is intermittently failing.
> This test is forcing another page, while cleanup is happening on the 
> background.
> ForceAnotherPage may not put the address back into paging if this happened 
> right after the cleanup call.
> To fix the test, we should call startPaging after forceAnotherPage is called.



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


[jira] [Created] (ARTEMIS-4248) Fix PagingTest::testSimpleResume

2023-04-21 Thread Clebert Suconic (Jira)
Clebert Suconic created ARTEMIS-4248:


 Summary: Fix PagingTest::testSimpleResume
 Key: ARTEMIS-4248
 URL: https://issues.apache.org/jira/browse/ARTEMIS-4248
 Project: ActiveMQ Artemis
  Issue Type: Test
Reporter: Clebert Suconic


testSimpleResume is intermittently failing.

This test is forcing another page, while cleanup is happening on the background.
ForceAnotherPage may not put the address back into paging if this happened 
right after the cleanup call.

To fix the test, we should call startPaging after forceAnotherPage is called.



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


[jira] [Work logged] (ARTEMIS-3042) Official Docker Multistage Build as well as an official Docker image.

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 14:47
Start Date: 21/Apr/23 14:47
Worklog Time Spent: 10m 
  Work Description: SamTV12345 commented on PR #4307:
URL: 
https://github.com/apache/activemq-artemis/pull/4307#issuecomment-1517948825

   You're welcome :)




Issue Time Tracking
---

Worklog Id: (was: 858465)
Time Spent: 6h 40m  (was: 6.5h)

> Official Docker Multistage Build as well as an official Docker image.
> -
>
> Key: ARTEMIS-3042
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3042
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: John Behm
>Priority: Minor
>  Labels: docker,, dockerfile,, kubernetes
>  Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> It would be rather convenient to get people up and running with an easy to 
> build or to setup Docker image that automatically builds the project from 
> source, discards the build container and moves the necessary files over to 
> the final container that can simply be started.
> The current docker image build is not really user firendly or convenient at 
> all.
>  
> https://github.com/apache/activemq-artemis/tree/master/artemis-docker
> The whole setup process of artemis in a containerized environment is  very 
> far from even good.
> The hurdle of using this software is gigantic, as the configuration is so 
> complex, one will not be able to do this within one month without having gone 
> through the whole documentation multiple times.



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


[jira] [Work logged] (ARTEMIS-3042) Official Docker Multistage Build as well as an official Docker image.

2023-04-21 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 21/Apr/23 14:35
Start Date: 21/Apr/23 14:35
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4307:
URL: 
https://github.com/apache/activemq-artemis/pull/4307#issuecomment-1517931191

   @SamTV12345 thanks.. will merge before the release next week for sure




Issue Time Tracking
---

Worklog Id: (was: 858454)
Time Spent: 6.5h  (was: 6h 20m)

> Official Docker Multistage Build as well as an official Docker image.
> -
>
> Key: ARTEMIS-3042
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3042
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: John Behm
>Priority: Minor
>  Labels: docker,, dockerfile,, kubernetes
>  Time Spent: 6.5h
>  Remaining Estimate: 0h
>
> It would be rather convenient to get people up and running with an easy to 
> build or to setup Docker image that automatically builds the project from 
> source, discards the build container and moves the necessary files over to 
> the final container that can simply be started.
> The current docker image build is not really user firendly or convenient at 
> all.
>  
> https://github.com/apache/activemq-artemis/tree/master/artemis-docker
> The whole setup process of artemis in a containerized environment is  very 
> far from even good.
> The hurdle of using this software is gigantic, as the configuration is so 
> complex, one will not be able to do this within one month without having gone 
> through the whole documentation multiple times.



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