From 4ecbbc9388a727823631dbff555601115926b68e Mon Sep 17 00:00:00 2001 From: Martyn Taylor Date: Tue, 7 Jul 2015 16:24:00 +0100 Subject: [PATCH] Enable MQTT in default broker config --- .../java/org/apache/activemq/artemis/cli/commands/Create.java | 3 +++ .../org/apache/activemq/artemis/cli/commands/etc/broker.xml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java index ca7484c10c..b349ad18d5 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java @@ -64,6 +64,8 @@ public class Create extends InputAbstract private static final Integer HTTP_PORT = 8161; + private static final Integer MQTT_PORT = 1883; + public static final String BIN_ARTEMIS_CMD = "bin/artemis.cmd"; public static final String BIN_ARTEMIS_SERVICE_EXE = "bin/artemis-service.exe"; public static final String BIN_ARTEMIS_SERVICE_XML = "bin/artemis-service.xml"; @@ -501,6 +503,7 @@ public class Create extends InputAbstract filters.put("${amqp.port}", String.valueOf(AMQP_PORT + portOffset)); filters.put("${stomp.port}", String.valueOf(STOMP_PORT + portOffset)); filters.put("${hq.port}", String.valueOf(HQ_PORT + portOffset)); + filters.put("${mqtt.port}", String.valueOf(MQTT_PORT + portOffset)); filters.put("${http.port}", String.valueOf(HTTP_PORT + portOffset)); filters.put("${data.dir}", data); filters.put("${max-hops}", String.valueOf(maxHops)); diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml index 0f5dc3e5d0..a2d0ee70a5 100644 --- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml +++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml @@ -55,7 +55,11 @@ ${connector-config.settings} tcp://${host}:${hq.port}?protocols=HORNETQ,STOMP + + + tcp://${host}:${mqtt.port}?protocols=MQTT + ${cluster-security.settings}${cluster.settings}${replicated.settings}${shared-store.settings}