You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/03/01 21:23:03 UTC

[6/9] activemq-artemis git commit: NO-JIRA fix-up examples

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java b/examples/features/standard/shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java
new file mode 100644
index 0000000..d226dbf
--- /dev/null
+++ b/examples/features/standard/shared-consumer/src/main/java/org/apache/activemq/artemis/jms/example/JMSSharedConsumerExample.java
@@ -0,0 +1,86 @@
+/*
+ * 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.jms.example;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSConsumer;
+import javax.jms.JMSContext;
+import javax.jms.JMSProducer;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+
+/**
+ * A JMS Example that uses shared consumers.
+ */
+public class JMSSharedConsumerExample {
+
+   public static void main(final String[] args) throws Exception {
+      InitialContext initialContext = null;
+      JMSContext jmsContext = null;
+      JMSContext jmsContext2 = null;
+      try {
+         // Step 1. Create an initial context to perform the JNDI lookup.
+         initialContext = new InitialContext();
+
+         // Step 2. Perfom a lookup on the queue
+         Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
+
+         // Step 3. Perform a lookup on the Connection Factory
+         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
+
+         // Step 4.Create a JMS Context
+         jmsContext = cf.createContext();
+
+         // Step 5. Create a message producer.
+         JMSProducer producer = jmsContext.createProducer();
+
+         // Step 6. Create a shared consumer
+         JMSConsumer jmsConsumer = jmsContext.createSharedConsumer(topic, "sc1");
+
+         // Step 7. Create a second JMS Context for a second shared consumer
+         jmsContext2 = cf.createContext();
+
+         // Step 8. Create the second shared consumer
+         JMSConsumer jmsConsumer2 = jmsContext2.createSharedConsumer(topic, "sc1");
+
+         // Step 9. send 2 messages
+         producer.send(topic, "this is a String!");
+
+         producer.send(topic, "this is a second String!");
+
+         // Step 10. receive the messages shared by both consumers
+         String body = jmsConsumer.receiveBody(String.class, 5000);
+
+         System.out.println("body = " + body);
+
+         body = jmsConsumer2.receiveBody(String.class, 5000);
+
+         System.out.println("body = " + body);
+      } finally {
+         // Step 11. Be sure to close our JMS resources!
+         if (initialContext != null) {
+            initialContext.close();
+         }
+         if (jmsContext != null) {
+            jmsContext.close();
+         }
+         if (jmsContext2 != null) {
+            jmsContext2.close();
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/shared-consumer/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/shared-consumer/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/shared-consumer/src/main/resources/activemq/server0/broker.xml
new file mode 100644
index 0000000..91d733a
--- /dev/null
+++ b/examples/features/standard/shared-consumer/src/main/resources/activemq/server0/broker.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+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.
+-->
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+   <core xmlns="urn:activemq:core">
+
+      <bindings-directory>./data/bindings</bindings-directory>
+
+      <journal-directory>./data/journal</journal-directory>
+
+      <large-messages-directory>./data/largemessages</large-messages-directory>
+
+      <paging-directory>./data/paging</paging-directory>
+
+      <!-- Acceptors -->
+
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
+      </acceptors>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example topic-->
+         <security-setting match="exampleTopic">
+            <permission roles="guest" type="createDurableQueue"/>
+            <permission roles="guest" type="deleteDurableQueue"/>
+            <permission roles="guest" type="createNonDurableQueue"/>
+            <permission roles="guest" type="deleteNonDurableQueue"/>
+            <permission roles="guest" type="consume"/>
+            <permission roles="guest" type="send"/>
+         </security-setting>
+      </security-settings>
+
+      <addresses>
+         <address name="exampleTopic">
+            <multicast/>
+         </address>
+      </addresses>
+   </core>
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/shared-consumer/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/shared-consumer/src/main/resources/jndi.properties b/examples/features/standard/shared-consumer/src/main/resources/jndi.properties
new file mode 100644
index 0000000..54bed6d
--- /dev/null
+++ b/examples/features/standard/shared-consumer/src/main/resources/jndi.properties
@@ -0,0 +1,20 @@
+# 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.
+
+java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
+connectionFactory.ConnectionFactory=tcp://localhost:61616
+topic.topic/exampleTopic=exampleTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/static-selector/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/static-selector/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/static-selector/src/main/resources/activemq/server0/broker.xml
index b6bda09..066b92f 100644
--- a/examples/features/standard/static-selector/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/static-selector/src/main/resources/activemq/server0/broker.xml
@@ -18,6 +18,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 <configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+   <core xmlns="urn:activemq:core">
       <bindings-directory>./data/messaging/bindings</bindings-directory>
 
       <journal-directory>./data/messaging/journal</journal-directory>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/temp-queue/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/temp-queue/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/temp-queue/src/main/resources/activemq/server0/broker.xml
index a987728..ee0398b 100644
--- a/examples/features/standard/temp-queue/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/temp-queue/src/main/resources/activemq/server0/broker.xml
@@ -37,6 +37,7 @@ under the License.
       <security-settings>
          <!--security for example queues -->
          <security-setting match="#">
+            <permission roles="guest" type="deleteAddress"/>
             <permission roles="guest" type="createDurableQueue"/>
             <permission roles="guest" type="deleteDurableQueue"/>
             <permission roles="guest" type="createNonDurableQueue"/>
@@ -44,20 +45,6 @@ under the License.
             <permission roles="guest" type="consume"/>
             <permission roles="guest" type="send"/>
          </security-setting>
-         <!-- security settings for JMS temporary queue -->
-         <security-setting match="#">
-            <permission roles="guest" type="createNonDurableQueue"/>
-            <permission roles="guest" type="deleteNonDurableQueue"/>
-            <permission roles="guest" type="consume"/>
-            <permission roles="guest" type="send"/>
-         </security-setting>
       </security-settings>
-      <addresses>
-         <address name="exampleQueue">
-            <anycast>
-               <queue name="jms.queue.exampleQueue"/>
-            </anycast>
-         </address>
-      </addresses>
    </core>
 </configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example1/pom.xml b/examples/features/standard/topic-selector-example1/pom.xml
deleted file mode 100644
index 4384afa..0000000
--- a/examples/features/standard/topic-selector-example1/pom.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version='1.0'?>
-<!--
-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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.broker</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>topic-selector1</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Topic Selector Example 1</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client-all</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>start</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <spawn>true</spawn>
-                     <testURI>tcp://localhost:61616</testURI>
-                     <args>
-                        <param>run</param>
-                     </args>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.jms.example.TopicSelectorExample1</clientClass>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <args>
-                        <param>stop</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.broker</groupId>
-                  <artifactId>topic-selector1</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example1/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example1/readme.md b/examples/features/standard/topic-selector-example1/readme.md
deleted file mode 100644
index b0a5559..0000000
--- a/examples/features/standard/topic-selector-example1/readme.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# JMS Topic Selector Example 1
-
-To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
-
-This example shows how messages can be consumed from a topic using Message Selectors.
-
-Consumers (or Subscribers) will only consume messages routed to a topic that match the provided selector
-
-Topics and selectors are a standard part of JMS, please consult the JMS 1.1 specification for full details.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java b/examples/features/standard/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
deleted file mode 100644
index 8fe570f..0000000
--- a/examples/features/standard/topic-selector-example1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.naming.InitialContext;
-
-/**
- * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message.
- */
-public class TopicSelectorExample1 {
-
-   public static void main(final String[] args) throws Exception {
-      Connection connection = null;
-
-      InitialContext initialContext = null;
-      try {
-
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. Look-up the JMS topic
-         Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
-
-         // Step 3. Look-up the JMS connection factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4. Create a JMS connection
-         connection = cf.createConnection();
-
-         // Step 5. Create a JMS session
-         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-         // Step 6. Create a JMS message producer
-         MessageProducer producer = session.createProducer(topic);
-
-         // Step 7. Create one subscription with a specific Filter for someID=1
-         MessageConsumer messageConsumer1 = session.createConsumer(topic, "someID=1", false);
-
-         // Step 8. Create another subscription with a specific Filter for someID=2
-         MessageConsumer messageConsumer2 = session.createConsumer(topic, "someID=2", false);
-
-         // Step 9. Create another subscription with no filters, which will receive every message sent to the topic
-         MessageConsumer messageConsumer3 = session.createConsumer(topic);
-
-         // Step 10. Send 20 messages, 10 with someID=1, 10 with someID=2
-
-         for (int i = 1; i < 10; i++) {
-            for (int someID = 1; someID <= 2; someID++) {
-               // Step 10.1 Create a text message
-               TextMessage message1 = session.createTextMessage("This is a text message " + i +
-                                                                   " sent for someID=" +
-                                                                   someID);
-
-               // Step 10.1 Set a property
-               message1.setIntProperty("someID", someID);
-
-               // Step 10.2 Send the message
-               producer.send(message1);
-
-               System.out.println("Sent message: " + message1.getText());
-            }
-         }
-
-         // Step 11. Start the JMS Connection. This step will activate the subscribers to receive messages.
-         connection.start();
-
-         // Step 12. Consume the messages from MessageConsumer1, filtering out someID=2
-
-         System.out.println("*************************************************************");
-         System.out.println("MessageConsumer1 will only receive messages where someID=1:");
-         for (;;) {
-            TextMessage messageReceivedA = (TextMessage) messageConsumer1.receive(1000);
-            if (messageReceivedA == null) {
-               break;
-            }
-
-            System.out.println("messageConsumer1 received " + messageReceivedA.getText() +
-                                  " someID = " +
-                                  messageReceivedA.getIntProperty("someID"));
-         }
-
-         // Step 13. Consume the messages from MessageConsumer2, filtering out someID=2
-         System.out.println("*************************************************************");
-         System.out.println("MessageConsumer2 will only receive messages where someID=2:");
-         for (;;) {
-            TextMessage messageReceivedB = (TextMessage) messageConsumer2.receive(1000);
-            if (messageReceivedB == null) {
-               break;
-            }
-
-            System.out.println("messageConsumer2 received " + messageReceivedB.getText() +
-                                  " someID = " +
-                                  messageReceivedB.getIntProperty("someID"));
-         }
-
-         // Step 14. Consume the messages from MessageConsumer3, receiving the complete set of messages
-         System.out.println("*************************************************************");
-         System.out.println("MessageConsumer3 will receive every message:");
-         for (;;) {
-            TextMessage messageReceivedC = (TextMessage) messageConsumer3.receive(1000);
-            if (messageReceivedC == null) {
-               break;
-            }
-            System.out.println("messageConsumer3 received " + messageReceivedC.getText() +
-                                  " someID = " +
-                                  messageReceivedC.getIntProperty("someID"));
-         }
-
-         // Step 15. Close the subscribers
-         messageConsumer1.close();
-         messageConsumer2.close();
-         messageConsumer3.close();
-      } finally {
-         // Step 15. Be sure to close our JMS resources!
-         if (initialContext != null) {
-            initialContext.close();
-         }
-         if (connection != null) {
-            connection.close();
-         }
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example1/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 42c38cb..0000000
--- a/examples/features/standard/topic-selector-example1/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-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.
--->
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example topic-->
-         <security-setting match="exampleTopic">
-            <permission roles="guest" type="createDurableQueue"/>
-            <permission roles="guest" type="deleteDurableQueue"/>
-            <permission roles="guest" type="createNonDurableQueue"/>
-            <permission roles="guest" type="deleteNonDurableQueue"/>
-            <permission roles="guest" type="consume"/>
-            <permission roles="guest" type="send"/>
-         </security-setting>
-      </security-settings>
-
-      <addresses>
-         <address name="exampleTopic">
-            <multicast/>
-         </address>
-      </addresses>
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example1/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example1/src/main/resources/jndi.properties b/examples/features/standard/topic-selector-example1/src/main/resources/jndi.properties
deleted file mode 100644
index 54bed6d..0000000
--- a/examples/features/standard/topic-selector-example1/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-topic.topic/exampleTopic=exampleTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example2/pom.xml b/examples/features/standard/topic-selector-example2/pom.xml
deleted file mode 100644
index 7a9fccd..0000000
--- a/examples/features/standard/topic-selector-example2/pom.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version='1.0'?>
-<!--
-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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.broker</groupId>
-      <artifactId>jms-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>topic-selector2</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis JMS Topic Selector Example 2</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client-all</artifactId>
-         <version>${project.version}</version>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>start</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <spawn>true</spawn>
-                     <testURI>tcp://localhost:61616</testURI>
-                     <args>
-                        <param>run</param>
-                     </args>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.jms.example.TopicSelectorExample2</clientClass>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <ignore>${noServer}</ignore>
-                     <args>
-                        <param>stop</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.broker</groupId>
-                  <artifactId>topic-selector2</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example2/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example2/readme.md b/examples/features/standard/topic-selector-example2/readme.md
deleted file mode 100644
index 01b7e6a..0000000
--- a/examples/features/standard/topic-selector-example2/readme.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# JMS Topic Selector Example 2
-
-To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
-
-This example shows you how to selectively consume messages using message selectors with topic consumers.
-
-Message selectors are strings with special syntax that can be used in creating consumers. Message consumers that are thus created only receive messages that match its selector. On message delivering, the ActiveMQ Server evaluates the corresponding message headers of the messages against each selector, if any, and then delivers the 'matched' messages to its consumer. Please consult the JMS 1.1 specification for full details.
-
-In this example, three message consumers are created on a topic. The first consumer is created with selector `'color=red'`, it only receives messages that have a 'color' string property of 'red' value; the second is created with selector `'color=green'`, it only receives messages who have a 'color' string property of 'green' value; and the third without a selector, which means it receives all messages. To illustrate, three messages with different 'color' property values are created and sent.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java b/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
deleted file mode 100644
index 5620251..0000000
--- a/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.naming.InitialContext;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * A simple JMS example that consumes messages using selectors.
- */
-public class TopicSelectorExample2 {
-
-   public static void main(final String[] args) throws Exception {
-      AtomicBoolean result = new AtomicBoolean(true);
-      Connection connection = null;
-      InitialContext initialContext = null;
-      try {
-         // /Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. perform a lookup on the topic
-         Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
-
-         // Step 3. perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4. Create a JMS Connection
-         connection = cf.createConnection();
-
-         // Step 5. Start the Connection
-         connection.start();
-
-         // Step 6. Create a JMS Session
-         Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
-         // Step 7. Create a Message Producer
-         MessageProducer producer = producerSession.createProducer(topic);
-
-         // Step 8. Prepare two selectors
-         String redSelector = "color='red'";
-         String greenSelector = "color='green'";
-
-         // Step 9. Create a JMS Message Consumer that receives 'red' messages
-         Session redSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer redConsumer = redSession.createConsumer(topic, redSelector);
-         redConsumer.setMessageListener(new SimpleMessageListener("red", result));
-
-         // Step 10. Create a second JMS message consumer that receives 'green' messages
-         Session greenSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer greenConsumer = greenSession.createConsumer(topic, greenSelector);
-         greenConsumer.setMessageListener(new SimpleMessageListener("green", result));
-
-         // Step 11. Create another JMS message consumer that receives all messages.
-         Session allSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         MessageConsumer allConsumer = allSession.createConsumer(topic);
-         allConsumer.setMessageListener(new SimpleMessageListener("all", result));
-
-         // Step 12. Create three messages, each has a color property
-         TextMessage redMessage = producerSession.createTextMessage("Red");
-         redMessage.setStringProperty("color", "red");
-         TextMessage greenMessage = producerSession.createTextMessage("Green");
-         greenMessage.setStringProperty("color", "green");
-         TextMessage blueMessage = producerSession.createTextMessage("Blue");
-         blueMessage.setStringProperty("color", "blue");
-
-         // Step 13. Send the Messages
-         producer.send(redMessage);
-         System.out.println("Message sent: " + redMessage.getText());
-         producer.send(greenMessage);
-         System.out.println("Message sent: " + greenMessage.getText());
-         producer.send(blueMessage);
-         System.out.println("Message sent: " + blueMessage.getText());
-
-         Thread.sleep(5000);
-
-         if (!result.get())
-            throw new IllegalStateException();
-      } finally {
-         // Step 14. Be sure to close our JMS resources!
-         if (connection != null) {
-            connection.close();
-         }
-
-         // Also the initialContext
-         if (initialContext != null) {
-            initialContext.close();
-         }
-      }
-   }
-}
-
-class SimpleMessageListener implements MessageListener {
-
-   private final String name;
-   AtomicBoolean result;
-
-   SimpleMessageListener(final String listener, AtomicBoolean result) {
-      name = listener;
-      this.result = result;
-   }
-
-   @Override
-   public void onMessage(final Message msg) {
-      TextMessage textMessage = (TextMessage) msg;
-      try {
-         String colorProp = msg.getStringProperty("color");
-         System.out.println("Receiver " + name +
-                               " receives message [" +
-                               textMessage.getText() +
-                               "] with color property: " +
-                               colorProp);
-         if (!colorProp.equals(name) && !name.equals("all")) {
-            result.set(false);
-         }
-      } catch (JMSException e) {
-         e.printStackTrace();
-         result.set(false);
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example2/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index 42c38cb..0000000
--- a/examples/features/standard/topic-selector-example2/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-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.
--->
-<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/bindings</bindings-directory>
-
-      <journal-directory>./data/journal</journal-directory>
-
-      <large-messages-directory>./data/largemessages</large-messages-directory>
-
-      <paging-directory>./data/paging</paging-directory>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <!-- Other config -->
-
-      <security-settings>
-         <!--security for example topic-->
-         <security-setting match="exampleTopic">
-            <permission roles="guest" type="createDurableQueue"/>
-            <permission roles="guest" type="deleteDurableQueue"/>
-            <permission roles="guest" type="createNonDurableQueue"/>
-            <permission roles="guest" type="deleteNonDurableQueue"/>
-            <permission roles="guest" type="consume"/>
-            <permission roles="guest" type="send"/>
-         </security-setting>
-      </security-settings>
-
-      <addresses>
-         <address name="exampleTopic">
-            <multicast/>
-         </address>
-      </addresses>
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector-example2/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector-example2/src/main/resources/jndi.properties b/examples/features/standard/topic-selector-example2/src/main/resources/jndi.properties
deleted file mode 100644
index 54bed6d..0000000
--- a/examples/features/standard/topic-selector-example2/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-topic.topic/exampleTopic=exampleTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector1/pom.xml b/examples/features/standard/topic-selector1/pom.xml
new file mode 100644
index 0000000..4384afa
--- /dev/null
+++ b/examples/features/standard/topic-selector1/pom.xml
@@ -0,0 +1,124 @@
+<?xml version='1.0'?>
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples.broker</groupId>
+      <artifactId>jms-examples</artifactId>
+      <version>2.5.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>topic-selector1</artifactId>
+   <packaging>jar</packaging>
+   <name>ActiveMQ Artemis JMS Topic Selector Example 1</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client-all</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.TopicSelectorExample1</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.broker</groupId>
+                  <artifactId>topic-selector1</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
+      </plugins>
+   </build>
+   <profiles>
+      <profile>
+         <id>release</id>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>com.vladsch.flexmark</groupId>
+                  <artifactId>markdown-page-generator-plugin</artifactId>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector1/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector1/readme.md b/examples/features/standard/topic-selector1/readme.md
new file mode 100644
index 0000000..b0a5559
--- /dev/null
+++ b/examples/features/standard/topic-selector1/readme.md
@@ -0,0 +1,9 @@
+# JMS Topic Selector Example 1
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
+
+This example shows how messages can be consumed from a topic using Message Selectors.
+
+Consumers (or Subscribers) will only consume messages routed to a topic that match the provided selector
+
+Topics and selectors are a standard part of JMS, please consult the JMS 1.1 specification for full details.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java b/examples/features/standard/topic-selector1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
new file mode 100644
index 0000000..8fe570f
--- /dev/null
+++ b/examples/features/standard/topic-selector1/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample1.java
@@ -0,0 +1,144 @@
+/*
+ * 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.jms.example;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+
+/**
+ * A simple JMS Topic example that creates a producer and consumer on a queue and sends and receives a message.
+ */
+public class TopicSelectorExample1 {
+
+   public static void main(final String[] args) throws Exception {
+      Connection connection = null;
+
+      InitialContext initialContext = null;
+      try {
+
+         // Step 1. Create an initial context to perform the JNDI lookup.
+         initialContext = new InitialContext();
+
+         // Step 2. Look-up the JMS topic
+         Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
+
+         // Step 3. Look-up the JMS connection factory
+         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
+
+         // Step 4. Create a JMS connection
+         connection = cf.createConnection();
+
+         // Step 5. Create a JMS session
+         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         // Step 6. Create a JMS message producer
+         MessageProducer producer = session.createProducer(topic);
+
+         // Step 7. Create one subscription with a specific Filter for someID=1
+         MessageConsumer messageConsumer1 = session.createConsumer(topic, "someID=1", false);
+
+         // Step 8. Create another subscription with a specific Filter for someID=2
+         MessageConsumer messageConsumer2 = session.createConsumer(topic, "someID=2", false);
+
+         // Step 9. Create another subscription with no filters, which will receive every message sent to the topic
+         MessageConsumer messageConsumer3 = session.createConsumer(topic);
+
+         // Step 10. Send 20 messages, 10 with someID=1, 10 with someID=2
+
+         for (int i = 1; i < 10; i++) {
+            for (int someID = 1; someID <= 2; someID++) {
+               // Step 10.1 Create a text message
+               TextMessage message1 = session.createTextMessage("This is a text message " + i +
+                                                                   " sent for someID=" +
+                                                                   someID);
+
+               // Step 10.1 Set a property
+               message1.setIntProperty("someID", someID);
+
+               // Step 10.2 Send the message
+               producer.send(message1);
+
+               System.out.println("Sent message: " + message1.getText());
+            }
+         }
+
+         // Step 11. Start the JMS Connection. This step will activate the subscribers to receive messages.
+         connection.start();
+
+         // Step 12. Consume the messages from MessageConsumer1, filtering out someID=2
+
+         System.out.println("*************************************************************");
+         System.out.println("MessageConsumer1 will only receive messages where someID=1:");
+         for (;;) {
+            TextMessage messageReceivedA = (TextMessage) messageConsumer1.receive(1000);
+            if (messageReceivedA == null) {
+               break;
+            }
+
+            System.out.println("messageConsumer1 received " + messageReceivedA.getText() +
+                                  " someID = " +
+                                  messageReceivedA.getIntProperty("someID"));
+         }
+
+         // Step 13. Consume the messages from MessageConsumer2, filtering out someID=2
+         System.out.println("*************************************************************");
+         System.out.println("MessageConsumer2 will only receive messages where someID=2:");
+         for (;;) {
+            TextMessage messageReceivedB = (TextMessage) messageConsumer2.receive(1000);
+            if (messageReceivedB == null) {
+               break;
+            }
+
+            System.out.println("messageConsumer2 received " + messageReceivedB.getText() +
+                                  " someID = " +
+                                  messageReceivedB.getIntProperty("someID"));
+         }
+
+         // Step 14. Consume the messages from MessageConsumer3, receiving the complete set of messages
+         System.out.println("*************************************************************");
+         System.out.println("MessageConsumer3 will receive every message:");
+         for (;;) {
+            TextMessage messageReceivedC = (TextMessage) messageConsumer3.receive(1000);
+            if (messageReceivedC == null) {
+               break;
+            }
+            System.out.println("messageConsumer3 received " + messageReceivedC.getText() +
+                                  " someID = " +
+                                  messageReceivedC.getIntProperty("someID"));
+         }
+
+         // Step 15. Close the subscribers
+         messageConsumer1.close();
+         messageConsumer2.close();
+         messageConsumer3.close();
+      } finally {
+         // Step 15. Be sure to close our JMS resources!
+         if (initialContext != null) {
+            initialContext.close();
+         }
+         if (connection != null) {
+            connection.close();
+         }
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector1/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector1/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/topic-selector1/src/main/resources/activemq/server0/broker.xml
new file mode 100644
index 0000000..42c38cb
--- /dev/null
+++ b/examples/features/standard/topic-selector1/src/main/resources/activemq/server0/broker.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+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.
+-->
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+   <core xmlns="urn:activemq:core">
+
+      <bindings-directory>./data/bindings</bindings-directory>
+
+      <journal-directory>./data/journal</journal-directory>
+
+      <large-messages-directory>./data/largemessages</large-messages-directory>
+
+      <paging-directory>./data/paging</paging-directory>
+
+      <!-- Acceptors -->
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
+      </acceptors>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example topic-->
+         <security-setting match="exampleTopic">
+            <permission roles="guest" type="createDurableQueue"/>
+            <permission roles="guest" type="deleteDurableQueue"/>
+            <permission roles="guest" type="createNonDurableQueue"/>
+            <permission roles="guest" type="deleteNonDurableQueue"/>
+            <permission roles="guest" type="consume"/>
+            <permission roles="guest" type="send"/>
+         </security-setting>
+      </security-settings>
+
+      <addresses>
+         <address name="exampleTopic">
+            <multicast/>
+         </address>
+      </addresses>
+   </core>
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector1/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector1/src/main/resources/jndi.properties b/examples/features/standard/topic-selector1/src/main/resources/jndi.properties
new file mode 100644
index 0000000..54bed6d
--- /dev/null
+++ b/examples/features/standard/topic-selector1/src/main/resources/jndi.properties
@@ -0,0 +1,20 @@
+# 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.
+
+java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
+connectionFactory.ConnectionFactory=tcp://localhost:61616
+topic.topic/exampleTopic=exampleTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector2/pom.xml b/examples/features/standard/topic-selector2/pom.xml
new file mode 100644
index 0000000..7a9fccd
--- /dev/null
+++ b/examples/features/standard/topic-selector2/pom.xml
@@ -0,0 +1,124 @@
+<?xml version='1.0'?>
+<!--
+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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <modelVersion>4.0.0</modelVersion>
+
+   <parent>
+      <groupId>org.apache.activemq.examples.broker</groupId>
+      <artifactId>jms-examples</artifactId>
+      <version>2.5.0-SNAPSHOT</version>
+   </parent>
+
+   <artifactId>topic-selector2</artifactId>
+   <packaging>jar</packaging>
+   <name>ActiveMQ Artemis JMS Topic Selector Example 2</name>
+
+   <properties>
+      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client-all</artifactId>
+         <version>${project.version}</version>
+      </dependency>
+   </dependencies>
+
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.TopicSelectorExample2</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.broker</groupId>
+                  <artifactId>topic-selector2</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
+      </plugins>
+   </build>
+   <profiles>
+      <profile>
+         <id>release</id>
+         <build>
+            <plugins>
+               <plugin>
+                  <groupId>com.vladsch.flexmark</groupId>
+                  <artifactId>markdown-page-generator-plugin</artifactId>
+               </plugin>
+            </plugins>
+         </build>
+      </profile>
+   </profiles>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector2/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector2/readme.md b/examples/features/standard/topic-selector2/readme.md
new file mode 100644
index 0000000..01b7e6a
--- /dev/null
+++ b/examples/features/standard/topic-selector2/readme.md
@@ -0,0 +1,9 @@
+# JMS Topic Selector Example 2
+
+To run the example, simply type **mvn verify** from this directory, or **mvn -PnoServer verify** if you want to start and create the broker manually.
+
+This example shows you how to selectively consume messages using message selectors with topic consumers.
+
+Message selectors are strings with special syntax that can be used in creating consumers. Message consumers that are thus created only receive messages that match its selector. On message delivering, the ActiveMQ Server evaluates the corresponding message headers of the messages against each selector, if any, and then delivers the 'matched' messages to its consumer. Please consult the JMS 1.1 specification for full details.
+
+In this example, three message consumers are created on a topic. The first consumer is created with selector `'color=red'`, it only receives messages that have a 'color' string property of 'red' value; the second is created with selector `'color=green'`, it only receives messages who have a 'color' string property of 'green' value; and the third without a selector, which means it receives all messages. To illustrate, three messages with different 'color' property values are created and sent.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java b/examples/features/standard/topic-selector2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
new file mode 100644
index 0000000..5620251
--- /dev/null
+++ b/examples/features/standard/topic-selector2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java
@@ -0,0 +1,144 @@
+/*
+ * 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.jms.example;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * A simple JMS example that consumes messages using selectors.
+ */
+public class TopicSelectorExample2 {
+
+   public static void main(final String[] args) throws Exception {
+      AtomicBoolean result = new AtomicBoolean(true);
+      Connection connection = null;
+      InitialContext initialContext = null;
+      try {
+         // /Step 1. Create an initial context to perform the JNDI lookup.
+         initialContext = new InitialContext();
+
+         // Step 2. perform a lookup on the topic
+         Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
+
+         // Step 3. perform a lookup on the Connection Factory
+         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
+
+         // Step 4. Create a JMS Connection
+         connection = cf.createConnection();
+
+         // Step 5. Start the Connection
+         connection.start();
+
+         // Step 6. Create a JMS Session
+         Session producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+         // Step 7. Create a Message Producer
+         MessageProducer producer = producerSession.createProducer(topic);
+
+         // Step 8. Prepare two selectors
+         String redSelector = "color='red'";
+         String greenSelector = "color='green'";
+
+         // Step 9. Create a JMS Message Consumer that receives 'red' messages
+         Session redSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageConsumer redConsumer = redSession.createConsumer(topic, redSelector);
+         redConsumer.setMessageListener(new SimpleMessageListener("red", result));
+
+         // Step 10. Create a second JMS message consumer that receives 'green' messages
+         Session greenSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageConsumer greenConsumer = greenSession.createConsumer(topic, greenSelector);
+         greenConsumer.setMessageListener(new SimpleMessageListener("green", result));
+
+         // Step 11. Create another JMS message consumer that receives all messages.
+         Session allSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         MessageConsumer allConsumer = allSession.createConsumer(topic);
+         allConsumer.setMessageListener(new SimpleMessageListener("all", result));
+
+         // Step 12. Create three messages, each has a color property
+         TextMessage redMessage = producerSession.createTextMessage("Red");
+         redMessage.setStringProperty("color", "red");
+         TextMessage greenMessage = producerSession.createTextMessage("Green");
+         greenMessage.setStringProperty("color", "green");
+         TextMessage blueMessage = producerSession.createTextMessage("Blue");
+         blueMessage.setStringProperty("color", "blue");
+
+         // Step 13. Send the Messages
+         producer.send(redMessage);
+         System.out.println("Message sent: " + redMessage.getText());
+         producer.send(greenMessage);
+         System.out.println("Message sent: " + greenMessage.getText());
+         producer.send(blueMessage);
+         System.out.println("Message sent: " + blueMessage.getText());
+
+         Thread.sleep(5000);
+
+         if (!result.get())
+            throw new IllegalStateException();
+      } finally {
+         // Step 14. Be sure to close our JMS resources!
+         if (connection != null) {
+            connection.close();
+         }
+
+         // Also the initialContext
+         if (initialContext != null) {
+            initialContext.close();
+         }
+      }
+   }
+}
+
+class SimpleMessageListener implements MessageListener {
+
+   private final String name;
+   AtomicBoolean result;
+
+   SimpleMessageListener(final String listener, AtomicBoolean result) {
+      name = listener;
+      this.result = result;
+   }
+
+   @Override
+   public void onMessage(final Message msg) {
+      TextMessage textMessage = (TextMessage) msg;
+      try {
+         String colorProp = msg.getStringProperty("color");
+         System.out.println("Receiver " + name +
+                               " receives message [" +
+                               textMessage.getText() +
+                               "] with color property: " +
+                               colorProp);
+         if (!colorProp.equals(name) && !name.equals("all")) {
+            result.set(false);
+         }
+      } catch (JMSException e) {
+         e.printStackTrace();
+         result.set(false);
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector2/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector2/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/topic-selector2/src/main/resources/activemq/server0/broker.xml
new file mode 100644
index 0000000..42c38cb
--- /dev/null
+++ b/examples/features/standard/topic-selector2/src/main/resources/activemq/server0/broker.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+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.
+-->
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+   <core xmlns="urn:activemq:core">
+
+      <bindings-directory>./data/bindings</bindings-directory>
+
+      <journal-directory>./data/journal</journal-directory>
+
+      <large-messages-directory>./data/largemessages</large-messages-directory>
+
+      <paging-directory>./data/paging</paging-directory>
+
+      <!-- Acceptors -->
+      <acceptors>
+         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
+      </acceptors>
+
+      <!-- Other config -->
+
+      <security-settings>
+         <!--security for example topic-->
+         <security-setting match="exampleTopic">
+            <permission roles="guest" type="createDurableQueue"/>
+            <permission roles="guest" type="deleteDurableQueue"/>
+            <permission roles="guest" type="createNonDurableQueue"/>
+            <permission roles="guest" type="deleteNonDurableQueue"/>
+            <permission roles="guest" type="consume"/>
+            <permission roles="guest" type="send"/>
+         </security-setting>
+      </security-settings>
+
+      <addresses>
+         <address name="exampleTopic">
+            <multicast/>
+         </address>
+      </addresses>
+   </core>
+</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/features/standard/topic-selector2/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/topic-selector2/src/main/resources/jndi.properties b/examples/features/standard/topic-selector2/src/main/resources/jndi.properties
new file mode 100644
index 0000000..54bed6d
--- /dev/null
+++ b/examples/features/standard/topic-selector2/src/main/resources/jndi.properties
@@ -0,0 +1,20 @@
+# 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.
+
+java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
+connectionFactory.ConnectionFactory=tcp://localhost:61616
+topic.topic/exampleTopic=exampleTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/protocols/amqp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/protocols/amqp/pom.xml b/examples/protocols/amqp/pom.xml
index f09f4ec..186f668 100644
--- a/examples/protocols/amqp/pom.xml
+++ b/examples/protocols/amqp/pom.xml
@@ -56,8 +56,9 @@ under the License.
       <profile>
          <id>examples</id>
          <modules>
-            <!-- this one to be run manually
-            <module>proton-cpp</module> -->
+            <!-- these to be run manually
+            <module>proton-cpp</module>
+            <module>proton-clustered-cpp</module> -->
 
             <module>queue</module>
             <module>proton-ruby</module>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afd7d8b3/examples/protocols/mqtt/basic-pubsub/pom.xml
----------------------------------------------------------------------
diff --git a/examples/protocols/mqtt/basic-pubsub/pom.xml b/examples/protocols/mqtt/basic-pubsub/pom.xml
deleted file mode 100644
index 73671b4..0000000
--- a/examples/protocols/mqtt/basic-pubsub/pom.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version='1.0'?>
-<!--
-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.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq.examples.mqtt</groupId>
-      <artifactId>mqtt-examples</artifactId>
-      <version>2.5.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>artemis-mqtt-publish-example</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Artemis MQTT Publish Example</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/../../../..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.fusesource.mqtt-client</groupId>
-         <artifactId>mqtt-client</artifactId>
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.activemq</groupId>
-            <artifactId>artemis-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>create</id>
-                  <goals>
-                     <goal>create</goal>
-                  </goals>
-               </execution>
-               <execution>
-                  <id>start</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <spawn>true</spawn>
-                     <testURI>tcp://localhost:61616</testURI>
-                     <args>
-                        <param>run</param>
-                     </args>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>runClient</id>
-                  <goals>
-                     <goal>runClient</goal>
-                  </goals>
-                  <configuration>
-                     <clientClass>org.apache.activemq.artemis.mqtt.example.MQTTBasicPubSubExample</clientClass>
-                     <args>
-                        <param>${basedir}/target/server0</param>
-                     </args>
-                  </configuration>
-               </execution>
-               <execution>
-                  <id>stop</id>
-                  <goals>
-                     <goal>cli</goal>
-                  </goals>
-                  <configuration>
-                     <args>
-                        <param>stop</param>
-                     </args>
-                  </configuration>
-               </execution>
-            </executions>
-            <dependencies>
-               <dependency>
-                  <groupId>org.apache.activemq.examples.mqtt</groupId>
-                  <artifactId>artemis-mqtt-publish-example</artifactId>
-                  <version>${project.version}</version>
-               </dependency>
-            </dependencies>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-clean-plugin</artifactId>
-         </plugin>
-      </plugins>
-   </build>
-   <profiles>
-      <profile>
-         <id>release</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>com.vladsch.flexmark</groupId>
-                  <artifactId>markdown-page-generator-plugin</artifactId>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
-</project>
\ No newline at end of file