You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/09/21 10:35:46 UTC
[camel] branch main updated: (chores) camel-test-infra-artemis: avoid blocking on disk full for MQTT addresses (#11508)
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 2509b469b5a (chores) camel-test-infra-artemis: avoid blocking on disk full for MQTT addresses (#11508)
2509b469b5a is described below
commit 2509b469b5acfc46861643d01f0495133b690ddb
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Thu Sep 21 12:35:38 2023 +0200
(chores) camel-test-infra-artemis: avoid blocking on disk full for MQTT addresses (#11508)
---
.../camel/test/infra/artemis/services/ArtemisMQTTService.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/test-infra/camel-test-infra-artemis/src/test/java/org/apache/camel/test/infra/artemis/services/ArtemisMQTTService.java b/test-infra/camel-test-infra-artemis/src/test/java/org/apache/camel/test/infra/artemis/services/ArtemisMQTTService.java
index b0989bde725..3aefff99992 100644
--- a/test-infra/camel-test-infra-artemis/src/test/java/org/apache/camel/test/infra/artemis/services/ArtemisMQTTService.java
+++ b/test-infra/camel-test-infra-artemis/src/test/java/org/apache/camel/test/infra/artemis/services/ArtemisMQTTService.java
@@ -17,6 +17,8 @@
package org.apache.camel.test.infra.artemis.services;
import org.apache.activemq.artemis.core.config.Configuration;
+import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
+import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import static org.junit.jupiter.api.Assertions.fail;
@@ -38,8 +40,15 @@ public class ArtemisMQTTService extends AbstractArtemisEmbeddedService {
this.port = port;
brokerURL = "tcp://0.0.0.0:" + port;
+
+ AddressSettings addressSettings = new AddressSettings();
+ addressSettings.setAddressFullMessagePolicy(AddressFullMessagePolicy.FAIL);
+
try {
configuration.addAcceptorConfiguration("mqtt", brokerURL + "?protocols=MQTT");
+
+ configuration.addAddressSetting("#", addressSettings);
+ configuration.setMaxDiskUsage(98);
} catch (Exception e) {
LOG.warn(e.getMessage(), e);
fail("mqtt acceptor cannot be configured");