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

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

                Author: ASF GitHub Bot
            Created on: 19/Sep/22 14:45
            Start Date: 19/Sep/22 14:45
    Worklog Time Spent: 10m 
      Work Description: gtully commented on code in PR #4224:
URL: https://github.com/apache/activemq-artemis/pull/4224#discussion_r974327684


##########
tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/clusteredLargeMessage/ClusteredLargeMessageTest.java:
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.smoke.clusteredLargeMessage;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
+import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.util.CFUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ClusteredLargeMessageTest extends SmokeTestBase {
+
+   public static final String SERVER_NAME_0 = "clusteredLargeMessage/cluster1";
+   public static final String SERVER_NAME_1 = "clusteredLargeMessage/cluster2";
+
+   Process server1Process;
+
+   @Before
+   public void before() throws Exception {
+      cleanupData(SERVER_NAME_0);
+      cleanupData(SERVER_NAME_1);
+      server1Process = startServer(SERVER_NAME_0, 0, 30000);
+      startServer(SERVER_NAME_1, 100, 30000);
+   }
+
+   @Test
+   public void testLargeMessage() throws Exception {
+
+      // I'm calling all 3 here as I want to run all of these with a single 
server start
+      // without having to deal with beforeClass and afterClass on this test
+      internalTestLargeMessge("CORE");
+      internalTestLargeMessge("AMQP");
+      internalTestLargeMessge("OPENWIRE");
+   }
+
+   private void internalTestLargeMessge(String protocol) throws Exception {
+
+      ConnectionFactory server2CF = CFUtil.createConnectionFactory(protocol, 
"tcp://localhost:61716");
+      Connection connection2 = server2CF.createConnection();
+      Session session2 = connection2.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
+      Queue queue2 = session2.createQueue("testQueue");
+      MessageConsumer consumer2 = session2.createConsumer(queue2);
+      connection2.start();
+
+      ConnectionFactory server1CF = CFUtil.createConnectionFactory(protocol, 
"tcp://localhost:61716");

Review Comment:
   should the port be different in the urls?





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

    Worklog Id:     (was: 810061)
    Time Spent: 20m  (was: 10m)

> FlowControl on BridgeImpl is broken for Large Messages
> ------------------------------------------------------
>
>                 Key: ARTEMIS-4003
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4003
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> LargeMessages over BridgeImpl (including Clustering) will request more 
> credits eventually than what they are entitled. This is because we don't flow 
> control the large message producer on the Bridge (at least not yet), and the 
> sender could get to a window where it requested more credits than it was 
> entitled. The flow control on the Bridge is limited to handle returning busy 
> or not (and that should be enough really).
> as a Result, the flow control will never refill and the bridge would freeze 
> and get stuck.
> To fix this situation we should check for the starve at the end of the 
> receive credits and do the proper refill.
> I am writing a test validating this issue, it will be under smokeTests and it 
> will be named 
> org.apache.activemq.artemis.tests.smoke.clusteredLargeMessage.ClusteredLargeMessageTest



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

Reply via email to