Repository: EnMasseProject/enmasse (java)

Issue:
Connections slow to appear or update in the Console.
**Describe the bug**

When testing with large numbers of connections (7K) and addresses (15K), you notice that connections take a long time to appear and seem sluggish to update.  Large address populations are not affected.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a very large number of connections.
2. Bounce the console pod
3. Observe it takes a long time (several minutes) for the full population of connections to appear.

**Expected behavior**
Both datasets should appear rapidily.


Pull request:
Fix #5238: Console receiver grants too little credit to agent_data receiving link

### Type of change


- Bugfix

### Description

Receiving link was granting credit 1, so messages were effectively being polled.

### Checklist


- [ ] Update/write design documentation in `./documentation/design`
- [ ] Write tests and make sure they pass
- [ ] Update documentation
- [ ] Check RBAC rights for Kubernetes / OpenShift roles
- [ ] Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
- [ ] Reference relevant issue(s) and close them after merging
- [ ] Update CHANGELOG.md


Patch:
diff --git a/address-space-controller/pom.xml b/address-space-controller/pom.xml
index 0dacaeb77..7c550f0cc 100644
--- a/address-space-controller/pom.xml
+++ b/address-space-controller/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>address-space-controller</artifactId>
diff --git a/agent/pom.xml b/agent/pom.xml
index b9b56b4bf..2a0a05408 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/amqp-utils/pom.xml b/amqp-utils/pom.xml
index fd9d9fc8a..83b32dea5 100644
--- a/amqp-utils/pom.xml
+++ b/amqp-utils/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>amqp-utils</artifactId>
diff --git a/api-common/pom.xml b/api-common/pom.xml
index 00b2e608c..2340df68b 100644
--- a/api-common/pom.xml
+++ b/api-common/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>api-common</artifactId>
diff --git a/api-model-annotator/pom.xml b/api-model-annotator/pom.xml
index 8170c2a2f..ac229de84 100644
--- a/api-model-annotator/pom.xml
+++ b/api-model-annotator/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>api-model-annotator</artifactId>
diff --git a/api-model/pom.xml b/api-model/pom.xml
index 5b093c5b6..baa792f93 100644
--- a/api-model/pom.xml
+++ b/api-model/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>api-model</artifactId>
diff --git a/broker-plugin/amqp-connector/pom.xml b/broker-plugin/amqp-connector/pom.xml
index 74c46b702..8d270f432 100644
--- a/broker-plugin/amqp-connector/pom.xml
+++ b/broker-plugin/amqp-connector/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>broker-plugin</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>amqp-connector</artifactId>
diff --git a/broker-plugin/amqp-connector/src/main/java/org/apache/activemq/artemis/integration/amqp/AMQPConnectorServiceFactory.java b/broker-plugin/amqp-connector/src/main/java/org/apache/activemq/artemis/integration/amqp/AMQPConnectorServiceFactory.java
index 7c49a85bc..d0aaa5256 100644
--- a/broker-plugin/amqp-connector/src/main/java/org/apache/activemq/artemis/integration/amqp/AMQPConnectorServiceFactory.java
+++ b/broker-plugin/amqp-connector/src/main/java/org/apache/activemq/artemis/integration/amqp/AMQPConnectorServiceFactory.java
@@ -129,13 +129,13 @@ public class AMQPConnectorServiceFactory implements ConnectorServiceFactory {
 
       String containerId = Optional.ofNullable((String)configuration.get(CONTAINER_ID)).orElse(clusterId);
 
-      int nettyThreads = Optional.ofNullable((String)configuration.get(NETTY_THREADS)).map(Integer::parseInt).orElse(4);
-      int idleTimeout = Optional.ofNullable((String)configuration.get(IDLE_TIMEOUT)).map(Integer::parseInt).orElse(16_000);
-      Integer consumerPriority = Optional.ofNullable((String)configuration.get(CONSUMER_PRIORITY)).map(Integer::parseInt).orElse(null);
+      int nettyThreads = Optional.ofNullable((String)configuration.get(NETTY_THREADS)).map(Util::parseIntOrNull).orElse(4);
+      int idleTimeout = Optional.ofNullable((String)configuration.get(IDLE_TIMEOUT)).map(Util::parseIntOrNull).orElse(16_000);
+      Integer consumerPriority = Optional.ofNullable((String)configuration.get(CONSUMER_PRIORITY)).map(Util::parseIntOrNull).orElse(null);
 
       boolean treatRejectAsUnmodifiedDeliveryFailed = Optional.ofNullable((String)configuration.get(TREAT_REJECT_AS_UNMODIFIED_DELIVERY_FAILED)).map(Boolean::parseBoolean).orElse(true);
       boolean useModifiedForTransientDeliveryErrors = Optional.ofNullable((String)configuration.get(USE_MODIFIED_FOR_TRANSIENT_DELIVERY_ERRORS)).map(Boolean::parseBoolean).orElse(true);
-      int minLargeMessageSize = Optional.ofNullable((String)configuration.get(MIN_LARGE_MESSAGE_SIZE)).map(Integer::parseInt).orElse(-1);
+      int minLargeMessageSize = Optional.ofNullable((String)configuration.get(MIN_LARGE_MESSAGE_SIZE)).map(Util::parseIntOrNull).orElse(-1);
 
       Optional<LinkInfo> linkInfo = sourceAddress.flatMap(s ->
               targetAddress.flatMap(t ->
diff --git a/broker-plugin/broker-cli/pom.xml b/broker-plugin/broker-cli/pom.xml
index 4a9f7c941..b6280d30b 100644
--- a/broker-plugin/broker-cli/pom.xml
+++ b/broker-plugin/broker-cli/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>broker-plugin</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>broker-cli</artifactId>
diff --git a/broker-plugin/plugin/pom.xml b/broker-plugin/plugin/pom.xml
index 82d941082..6cd1d06a3 100644
--- a/broker-plugin/plugin/pom.xml
+++ b/broker-plugin/plugin/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>broker-plugin</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
diff --git a/broker-plugin/pom.xml b/broker-plugin/pom.xml
index c96718a78..e90ace455 100644
--- a/broker-plugin/pom.xml
+++ b/broker-plugin/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
diff --git a/broker-plugin/sasl-delegation/pom.xml b/broker-plugin/sasl-delegation/pom.xml
index 89ad7df4b..e97702bed 100644
--- a/broker-plugin/sasl-delegation/pom.xml
+++ b/broker-plugin/sasl-delegation/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>broker-plugin</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>sasl-delegation</artifactId>
diff --git a/broker-plugin/tcnative/pom.xml b/broker-plugin/tcnative/pom.xml
index 6a40b7eb1..42c14a23f 100644
--- a/broker-plugin/tcnative/pom.xml
+++ b/broker-plugin/tcnative/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>broker-plugin</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>tcnative</artifactId>
diff --git a/bundle/pom.xml b/bundle/pom.xml
index 9a2c24d14..b3492e480 100644
--- a/bundle/pom.xml
+++ b/bundle/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <artifactId>enmasse</artifactId>
         <groupId>io.enmasse</groupId>
-        <version>0.33-SNAPSHOT</version>
+        <version>0.34-SNAPSHOT</version>
     </parent>
     <packaging>pom</packaging>
     <name>EnMasse Bundles</name>
diff --git a/console/console-init/pom.xml b/console/console-init/pom.xml
index 2a83c217d..f923efcf1 100644
--- a/console/console-init/pom.xml
+++ b/console/console-init/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>console</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/console/console-server/pom.xml b/console/console-server/pom.xml
index 6963fcc61..a6e15f0cd 100644
--- a/console/console-server/pom.xml
+++ b/console/console-server/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>console</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
diff --git a/console/pom.xml b/console/pom.xml
index 94ffff34f..a2fc8406d 100644
--- a/console/pom.xml
+++ b/console/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/controller-manager/pom.xml b/controller-manager/pom.xml
index ff4d707f1..0160b5e42 100644
--- a/controller-manager/pom.xml
+++ b/controller-manager/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
diff --git a/discovery-lib/pom.xml b/discovery-lib/pom.xml
index d1bd9ab04..4e2e9e9ce 100644
--- a/discovery-lib/pom.xml
+++ b/discovery-lib/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>discovery-lib</artifactId>
diff --git a/documentation/common/restapi-reference.adoc b/documentation/common/restapi-reference.adoc
index 098bb92bc..207895ede 100644
--- a/documentation/common/restapi-reference.adoc
+++ b/documentation/common/restapi-reference.adoc
@@ -8,7 +8,7 @@ This is the EnMasse API specification.
 
 === Version information
 [%hardbreaks]
-__Version__ : 0.33-SNAPSHOT
+__Version__ : 0.34-SNAPSHOT
 
 
 === URI scheme
diff --git a/documentation/pom.xml b/documentation/pom.xml
index e15fbf704..b9493204d 100644
--- a/documentation/pom.xml
+++ b/documentation/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>io.enmasse</groupId>
         <artifactId>enmasse</artifactId>
-        <version>0.33-SNAPSHOT</version>
+        <version>0.34-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>documentation</artifactId>
diff --git a/k8s-api/pom.xml b/k8s-api/pom.xml
index 2ce8e2015..7c697eddb 100644
--- a/k8s-api/pom.xml
+++ b/k8s-api/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/keycloak-plugin/pom.xml b/keycloak-plugin/pom.xml
index af44fb95e..da444548d 100644
--- a/keycloak-plugin/pom.xml
+++ b/keycloak-plugin/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
diff --git a/keycloak-plugin/sasl-plugin/pom.xml b/keycloak-plugin/sasl-plugin/pom.xml
index b35c7468f..f54f4a6a0 100644
--- a/keycloak-plugin/sasl-plugin/pom.xml
+++ b/keycloak-plugin/sasl-plugin/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>keycloak</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>sasl-plugin</artifactId>
diff --git a/keycloak-user-api/pom.xml b/keycloak-user-api/pom.xml
index a9b60ea6a..3e3411250 100644
--- a/keycloak-user-api/pom.xml
+++ b/keycloak-user-api/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/metrics-api/pom.xml b/metrics-api/pom.xml
index d34559a30..8f9201e36 100644
--- a/metrics-api/pom.xml
+++ b/metrics-api/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/none-authservice/pom.xml b/none-authservice/pom.xml
index ca50a0e8a..6ddbada8d 100644
--- a/none-authservice/pom.xml
+++ b/none-authservice/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>none-authservice</artifactId>
diff --git a/olm-manifest/pom.xml b/olm-manifest/pom.xml
index 470253885..dd5edd373 100644
--- a/olm-manifest/pom.xml
+++ b/olm-manifest/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>olm-manifest</artifactId>
diff --git a/pkg/consolegraphql/agent/agent.go b/pkg/consolegraphql/agent/agent.go
index 868c00127..4d95a3a59 100644
--- a/pkg/consolegraphql/agent/agent.go
+++ b/pkg/consolegraphql/agent/agent.go
@@ -168,6 +168,7 @@ func (aad *amqpAgentDelegate) doCollect() error {
 	// Create a receiver
 	receiver, err := session.NewReceiver(
 		amqp.LinkSourceAddress(agentDataAddress),
+		amqp.LinkCredit(500),
 	)
 	if err != nil {
 		return err
diff --git a/pom.properties b/pom.properties
index 717430b2a..7e29a0346 100644
--- a/pom.properties
+++ b/pom.properties
@@ -21,6 +21,6 @@ olm.csv.logo.base64=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3
 olm.csv.logo.mediatype=image/svg+xml
 license.advice.text=EnMasse comprises the following components:
 olm.version=0.33.9999
-release.version=0.33-SNAPSHOT
-maven.version=0.33-SNAPSHOT
+release.version=0.34-SNAPSHOT
+maven.version=0.34-SNAPSHOT
 application.docs=https://enmasse.io/documentation/
diff --git a/pom.xml b/pom.xml
index f05e59090..4c170f1b8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
     <packaging>pom</packaging>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
 
     <name>EnMasse</name>
     <url>http://enmasse.io/</url>
diff --git a/service-broker/pom.xml b/service-broker/pom.xml
index a84110b0d..771d771e2 100644
--- a/service-broker/pom.xml
+++ b/service-broker/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>service-broker</artifactId>
diff --git a/standard-controller/pom.xml b/standard-controller/pom.xml
index 70dc380ef..39a6546ff 100644
--- a/standard-controller/pom.xml
+++ b/standard-controller/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>standard-controller</artifactId>
diff --git a/templates/pom.xml b/templates/pom.xml
index b396ed8f6..ce76395b2 100644
--- a/templates/pom.xml
+++ b/templates/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
diff --git a/topic-forwarder/pom.xml b/topic-forwarder/pom.xml
index 9f34507cc..89ffdb60f 100644
--- a/topic-forwarder/pom.xml
+++ b/topic-forwarder/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>topic-forwarder</artifactId>


Test patch:
diff --git a/k8s-api-testutil/pom.xml b/k8s-api-testutil/pom.xml
index 86a4639cc..f9de7a29a 100644
--- a/k8s-api-testutil/pom.xml
+++ b/k8s-api-testutil/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>io.enmasse</groupId>
     <artifactId>enmasse</artifactId>
-    <version>0.33-SNAPSHOT</version>
+    <version>0.34-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>io.enmasse</groupId>
diff --git a/systemtests/pom.xml b/systemtests/pom.xml
index bf0e92990..3db358755 100644
--- a/systemtests/pom.xml
+++ b/systemtests/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <groupId>io.enmasse</groupId>
         <artifactId>enmasse</artifactId>
-        <version>0.33-SNAPSHOT</version>
+        <version>0.34-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>systemtests</artifactId>