[
https://issues.apache.org/jira/browse/ARTEMIS-3557?focusedWorklogId=684741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-684741
]
ASF GitHub Bot logged work on ARTEMIS-3557:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/Nov/21 14:31
Start Date: 22/Nov/21 14:31
Worklog Time Spent: 10m
Work Description: AntonRoskvist commented on a change in pull request
#3858:
URL: https://github.com/apache/activemq-artemis/pull/3858#discussion_r754331884
##########
File path:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/MessageRedistributionTest.java
##########
@@ -794,6 +794,46 @@ public void
testRedistributionOnlyWhenLocalRemovedLbOffWithRedistribution() thro
verifyReceiveAll(2, 1);
}
+ @Test
+ public void
testRedistributionToRemoteConsumerFromNewQueueLbOffWithRedistribution() throws
Exception {
+
+ String address = "test.address";
+ String queue = "test.address";
+ String clusterAddress = "test";
+ AddressSettings settings = new
AddressSettings().setRedistributionDelay(0).setAutoCreateAddresses(true).setAutoCreateQueues(true);
+ RoutingType routingType = RoutingType.ANYCAST;
+
+ getServer(0).getAddressSettingsRepository().addMatch(address, settings);
+ getServer(1).getAddressSettingsRepository().addMatch(address, settings);
+
+ setupClusterConnection("cluster0", clusterAddress,
MessageLoadBalancingType.OFF_WITH_REDISTRIBUTION, 1, isNetty(), 0, 1);
+ setupClusterConnection("cluster0", clusterAddress,
MessageLoadBalancingType.OFF_WITH_REDISTRIBUTION, 1, isNetty(), 1, 0);
+
+ startServers(0, 1);
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+
+ createQueue(0, address, queue, null, true, routingType);
+ addConsumer(0, 0, queue, null);
+ waitForBindings(0, address, 1, 1, true);
+
+ Thread.sleep(3000);
Review comment:
There needs to be some delay here to make sure the notification is
received and processed on the other node before creating the same queue there.
I will replace it with another "waitForBindings" instead because that's clearly
better. Thanks
--
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: 684741)
Time Spent: 1h 20m (was: 1h 10m)
> ARTEMIS-1925 fix does not handle redistribution to "old" consumers
> ------------------------------------------------------------------
>
> Key: ARTEMIS-3557
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3557
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Anton Roskvist
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> OFF_WITH_REDISTRIBUTION does not handle this scenario:
> If a destination and consumer exist on one node in a cluster and a producer
> shows up on another node messages will not get redistributed until the old
> consumer disconnects and reconnects.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)