activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [07/14] activemq-artemis git commit: ARTEMIS-1562 Refactor example documentation
Date Fri, 15 Dec 2017 14:55:26 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/management-notifications/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/management-notifications/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/management-notifications/src/main/resources/activemq/server0/broker.xml
index a42fc9c..c340a72 100644
--- a/examples/features/standard/management-notifications/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/management-notifications/src/main/resources/activemq/server0/broker.xml
@@ -16,10 +16,8 @@ software distributed under the License is distributed on an
 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 ../../../../src/schema/artemis-server.xsd">
-
-   
-
+-->
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq ../../../../src/schema/artemis-configuration.xsd">
    <core xmlns="urn:activemq:core">
 
       <bindings-directory>./data/messaging/bindings</bindings-directory>
@@ -67,7 +65,7 @@ under the License.
          </security-setting>
       </security-settings>
 
-   <addresses>
+      <addresses>
          <address name="notificationsTopic">
             <multicast/>
          </address>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/management/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/management/pom.xml b/examples/features/standard/management/pom.xml
index e1d1a64..94a302a 100644
--- a/examples/features/standard/management/pom.xml
+++ b/examples/features/standard/management/pom.xml
@@ -102,7 +102,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-
-</project>
+   <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/b77cdaf7/examples/features/standard/management/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/management/readme.html b/examples/features/standard/management/readme.html
deleted file mode 100644
index 30057ba..0000000
--- a/examples/features/standard/management/readme.html
+++ /dev/null
@@ -1,208 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis Management Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>Management Example</h1>
-     <p>This example shows how to manage ActiveMQ Artemis using JMS Messages to invoke management operations on the server.</a></p>
-     <p>To manage ActiveMQ Artemis using JMX, see the <a href="../jmx/readme.html">JMX</a> example.</p>
-
-     <h2>Example configuration</h2>
-
-     <p>ActiveMQ Artemis can be managed by sending JMS messages with specific properties to its <em>management</em> queue.</p>
-     </p>By default, the management name is called <code>activemq.management</code> but this can be configured in <a href="server0/broker.xml">broker.xml</a>
-     <pre class="prettyprint">
-         <code>&lt;management-address&gt;activemq.management&lt;/management-address&gt;</code>
-     </pre>
-
-     <p>The management queue requires a "special" user permission <code>manage</code> to be able to receive management messages.
-         This is also configured in <a href="server0/broker.xml">broker.xml</a></p>
-     <pre class="prettyprint">
-         <code>&lt;security-setting match="activemq.management"&gt;
-            &lt;permission type="manage" roles="guest" /&gt;
-         &lt;/security-setting&gt;</code>
-     </pre>
-
-     <h2>Example step-by-step</h2>
-     <p><em>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</em></p>
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get its properties from <a href="server0/client-jndi.properties">client-jndi.properties</a></li>
-        <pre class="prettyprint">
-            <code>InitialContext initialContext = getContext(0);</code>
-        </pre>
-
-        <li>We look up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-            <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-            <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-            <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-            <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-            <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-
-        <li>We create a JMS text message that we are going to send.</li>
-        <pre class="prettyprint">
-            <code>TextMessage message = session.createTextMessage("This is a text message");</code>
-        </pre>
-
-        <li>We send message to the queue</li>
-        <pre class="prettyprint">
-            <code>messageProducer.send(message);</code>
-        </pre>
-
-        <p><em>Now that we have a message in the queue, we will manage the queue by retrieving the number of messages in the queue
-            (i.e. 1) and by removing the message which has been sent in step 8.</em></p>
-
-        <li>We create the JMS management queue. This is a <em>special</em> queue which is not looked up from JNDI but instantiated directly</li>
-        <pre class="prettyprint">
-            <code>Queue managementQueue = new ActiveMQQueue("activemq.management", "activemq.management");</code>
-        </pre>
-
-        <li>We create a <code>QueueRequestor</code> to send messages to the management queue and receive replies (see <a href="../queue-requestor/readme.html">queue-requestor example</a>)</li>
-        <pre class="prettyprint">
-            <code>QueueRequestor requestor = new QueueRequestor(session, managementQueue);</code>
-        </pre>
-
-        <li>We start the connection to receive replies on the requestor</li>
-        <pre class="prettyprint">
-           <code>connection.start()</code>
-        </pre>
-
-        <li>We create a JMS message which will be used as a <em>management</em> message</li>
-        <pre class="prettyprint">
-            <code>Message m = session.createMessage();</code>
-        </pre>
-
-        <li>a <em>management</em> message has well-defined properties that ActiveMQ Artemis server needs to know to perform management operations.<br />
-            We use a helper class <code>JMSManagementHelper</code> to fill these properties:
-            <ul>
-                <li>The name of the resource to manage <code>jms.queue.exampleQueue</code>
-                    (i.e. <code>jms.queue</code> followed by the name of the queue as defined in <a href="server0/activemq-jms.xml">activemq-jms.xml</a>)</li>
-                <li>In our case, the name of the attribute to retrieve <code>MessageCount</code></li>
-            </ul>
-        </li>
-        <pre class="prettyprint">
-            <code>JMSManagementHelper.putAttribute(m, "jms.queue.exampleQueue", "MessageCount");</code>
-        </pre>
-
-        <li>We send the <em>management</em> message using the requestor and wait for a reply</li>
-        <pre class="prettyprint">
-            <code>Message reply = requestor.request(m);</code>
-        </pre>
-
-        <li>We use a helper class <code>JMSManagementHelper</code> to retrieve the result from the reply message:
-        <pre class="prettyprint">
-            <code>int messageCount = (Integer)JMSManagementHelper.getResult(reply);
-            System.out.println(queue.getQueueName() + " contains " + messageCount + " messages");</code>
-        </pre>
-
-        <li>We create another JMS message to use as a management message</li>
-        <pre class="prettyprint">
-            <code>m = session.createMessage();</code>
-        </pre>
-
-        <li>This time, we fill the <em>management</em> message with properties to <em>invoke</em> a management operation on the queue
-            <ul>
-                <li>the name of the resource <code>jms.queue.exampleQueue</code></li>
-                <li>the name of the management operation <code>removeMessage</code></li>
-                <li>any parameters required to invoke the management operations (in our case, the JMS Message ID of the message sent in step 8)</li>
-            </ul>
-        </li>
-        <pre class="prettyprint">
-            <code>JMSManagementHelper.putOperationInvocation(m, "jms.queue.exampleQueue", "removeMessage", message.getJMSMessageID());</code>
-        </pre>
-
-        <li>Again, we use the requestor to send the management message and wait for a reply</li>
-        <pre class="prettyprint">
-            <code>reply = requestor.request(m);</code>
-        </pre>
-
-        <li>We use the helper class to check that the operation was successfully invoked on the server</li>
-        <pre class="prettyprint">
-            <code>boolean success = JMSManagementHelper.hasOperationSucceeded(reply);
-            System.out.println("operation invocation has succeeded: " + success);</code>
-        </pre>
-
-        <li>We use a helper class <code>JMSManagementHelper</code> to retrieve the result from the reply message:
-            (in our case, the <code>removeMessage</code> method returns a boolean)</li>
-        <pre class="prettyprint">
-            <code>boolean messageRemoved = (Boolean)JMSManagementHelper.getResult(reply);
-            System.out.println("message has been removed: " + messageRemoved);</code>
-        </pre>
-
-        <p><em>We will now consume the message from the queue but there will be none: the message sent at step 8 was removed by the management operation</em></p>
-
-        <li>We create a JMS message consumer on the queue</li>
-        <pre class="prettyprint">
-            <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>We try to receive a message from the queue. Since there is none, the call will timeout after 5000ms and messageReceived will be null
-        </li>
-        <pre class="prettyprint">
-            <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
-            System.out.println("Received message: " + messageReceived);</code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-
-     <h2>More information</h2>
-
-     <ul>
-        <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#management.jms">Using Management Via JMS chapter</a></li>
-     </ul>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/management/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/management/readme.md b/examples/features/standard/management/readme.md
new file mode 100644
index 0000000..425c22a
--- /dev/null
+++ b/examples/features/standard/management/readme.md
@@ -0,0 +1,19 @@
+# Management Example
+
+This example shows how to manage ActiveMQ Artemis using JMS Messages to invoke management operations on the server.
+
+To manage ActiveMQ Artemis using JMX, see the "jmx" example.
+
+## Example configuration
+
+ActiveMQ Artemis can be managed by sending JMS messages with specific properties to its _management_ queue.
+
+By default, the management name is called `activemq.management` but this can be configured in broker.xml like so:
+
+    <management-address>activemq.management</management-address>
+
+The management queue requires a "special" user permission `manage` to be able to receive management messages. This is also configured in broker.xml:
+
+    <security-setting match="activemq.management">
+       <permission type="manage" roles="guest" />
+    </security-setting>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/management/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/management/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/management/src/main/resources/activemq/server0/broker.xml
index d8f997e..6d041c7 100644
--- a/examples/features/standard/management/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/management/src/main/resources/activemq/server0/broker.xml
@@ -16,10 +16,8 @@ software distributed under the License is distributed on an
 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-server.xsd">
-
-   
-
+-->
+<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>
@@ -65,7 +63,7 @@ under the License.
 
       </security-settings>
 
-   <addresses>
+      <addresses>
          <address name="exampleQueue">
             <anycast>
                <queue name="exampleQueue"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-counters/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-counters/pom.xml b/examples/features/standard/message-counters/pom.xml
index 30b58e5..fbd07c4 100644
--- a/examples/features/standard/message-counters/pom.xml
+++ b/examples/features/standard/message-counters/pom.xml
@@ -108,7 +108,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-
-</project>
+   <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/b77cdaf7/examples/features/standard/message-counters/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-counters/readme.html b/examples/features/standard/message-counters/readme.html
deleted file mode 100644
index 40e247a..0000000
--- a/examples/features/standard/message-counters/readme.html
+++ /dev/null
@@ -1,197 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis Message Counter Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>JMS Message Counter Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-     <p>This example shows you how to use message counters to obtain message information for a JMS queue.</p>
-     <p>The example will show how to configure sampling of message counters.<br />
-         We will produce and consume 1 message from a queue. Interleaved with the JMS operation, we will retrieve the queue's message counters
-         at different times to display the metrics on the queue.
-     </p>
-     <h2>Example setup</h2>
-     <p>Message counter is configured in the server configuration file <a href="server0/broker.xml">broker.xml</a>:</p>
-     <pre class="prettyprint">
-         <code>&lt;message-counter-enabled&gt;true&lt;/message-counter-enabled&gt;
-         &lt;message-counter-sample-period&gt;2000&lt;/message-counter-sample-period&gt;
-         &lt;message-counter-max-day-history&gt;2&lt;/message-counter-max-day-history&gt;</code>
-     </pre>
-     <p>By default, Message counter is not enabled (for performance reason). To enable them, set <code>message-counter-enabled</code> to <code>true</code>.<br />
-     Queues are sampled every 10 seconds by default. For this example we will reduce it to 2 seconds by setting <code>message-counter-sample-period</code> to <code>2000</code>.<br />
-     ActiveMQ Artemis holds in memory the message counters' history for a maximum number of days (10 by default). We can change the number of days the history is kept by setting
-         the <code>message-counter-max-day-history</code> parameter.</p>
-     <p>The sample period and the max day history parameters have a small impact on the performance of ActiveMQ Artemis (the resources taken to sample a queue are not available to the system's
-         normal use). You should set these parameters accordingly to the use and throughput of your messages.</p>
-
-     <h2>Example step-by-step</h2>
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection, session and producer for the queue</li>
-        <pre class="prettyprint">
-           <code> connection = cf.createQueueConnection();
-            QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
-            MessageProducer producer = session.createProducer(queue);</code>
-       </pre>
-
-        <li>We create and send a JMS text message</li>
-        <pre class="prettyprint">
-            <code>TextMessage message = session.createTextMessage("This is a text message");
-            producer.send(message);
-            System.out.println("Sent message: " + message.getText());</code>
-        </pre>
-
-        <li>We will now sleep a little bit to be sure the queue is sample. Since we have configure the sample period to be 2 seconds,
-            we will sleep for 3 seconds to be sure that a sample is taken</li>
-        <pre class="prettyprint">
-            <code>System.out.println("Sleep a little bit to have the queue sampled...");
-            Thread.sleep(3000);</code>
-        </pre>
-
-        <p>We now need to retrieve the message counters. They're available from the JMS Queue management resource. In this example, we
-            will retrieve them using JMX (see the <a href="../jmx/readme.html">JMX example</a> for a more complete description). You can also use JMS message to retrieve them (see the <a href="../management/readme.html">Management example</a> to
-            learn about managing ActiveMQ Artemis using JMS messages).</p>
-
-       <li>We retrieve the JMX MBean used to manage the JMS queue</li>
-        <pre class="prettyprint">
-            <code>ObjectName on = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queue.getQueueName());
-            JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL), new HashMap());
-            MBeanServerConnection mbsc = connector.getMBeanServerConnection();
-            JMSQueueControl queueControl = (JMSQueueControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,
-                                                                                              on,
-                                                                                              JMSQueueControl.class,
-                                                                                              false);</code>
-        </pre>
-
-        <li>We retrieve the message counter and display them. MessageCounters are retrieved as <code>JSON Strings</code> for portability reason (whether
-            JMX is used for management or JMS messages). To make it simpler to use them in the code, there is a <code>MessageCounterInfo</code> data structure.</li>
-        <pre class="prettyprint">
-            <code>String counters = queueControl.listMessageCounter();
-            MessageCounterInfo messageCounter = MessageCounterInfo.fromJSON(counters);</code>>
-        </pre>
-
-        <li>We display the message counters</li>
-        <pre class="prettyprint">
-            <code>displayMessageCounter(messageCounter);</code>
-        </pre>
-
-        <p>The message counter contains a variety of metrics on the queue which is sampled (total messages added to the queue, current depth of the queue, deltas since the last sample, timestamp
-            of the last message added, timestamp of the last sample, etc.)</p>
-        <pre class="prettyprint">
-            <code>
-            private void displayMessageCounter(MessageCounterInfo counter)
-            {
-               System.out.format("%s (sample updated at %s)\n",  counter.getName(), counter.getUdpateTimestamp());
-               System.out.format("   %s message(s) added to the queue (since last sample: %s)\n", counter.getCount(),
-                                                                                                  counter.getCountDelta());
-               System.out.format("   %s message(s) in the queue (since last sample: %s)\n", counter.getDepth(),
-                                                                                            counter.getDepthDelta());
-               System.out.format("   last message added at %s\n\n", counter.getLastAddTimestamp());
-            }</code>
-        </pre>
-
-        <li>We sleep again to have the queue sampled</li>
-        <pre class="prettyprint">
-            <code>System.out.println("Sleep a little bit again...");
-            Thread.sleep(3000);</code>
-        </pre>
-
-        <li>We list the message counters again</li>
-        <pre class="prettyprint">
-            <code>counters = queueControl.listMessageCounter();
-            messageCounter = MessageCounterInfo.fromJSON(counters);
-            displayMessageCounter(messageCounter);</code>
-        </pre>
-
-        <p>We will now consume a message from the queue before listing a last time the message counters</p>
-
-        <li>We create a consumer for the queue</li>
-        <pre class="prettyprint">
-            <code>MessageConsumer consumer = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>We start the connection to receive messages on the consumer</li>
-        <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>We receive a message from the queue</li>
-        <pre class="prettyprint">
-           <code>TextMessage messageReceived = (TextMessage)consumer.receive(5000);
-           System.out.format("Received message: %s\n\n", messageReceived.getText());</code>
-        </pre>
-
-        <li>We sleep one last time to have the queue sampled</li>
-        <pre class="prettyprint">
-            <code>System.out.println("Sleep a little bit one last time...");
-            Thread.sleep(3000);</code>
-        </pre>
-
-        <li>We list the message counters a final time (this time with no message in the queue)</li>
-        <pre class="prettyprint">
-            <code>counters = queueControl.listMessageCounter();
-            messageCounter = MessageCounterInfo.fromJSON(counters);
-            displayMessageCounter(messageCounter);</code>
-        </pre>
-
-        </p>
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-
-     <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#management.message-counters">Message Counters chapter</a></li>
-     <li><a href="../../../docs/api/org/jboss/messaging/core/management/MessageCounterInfo.html">MessageCounterInfo</a> is a helper class used
-        to create a MessageCounterInfo object from the JSON String which represents message counters</li>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-counters/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-counters/readme.md b/examples/features/standard/message-counters/readme.md
new file mode 100644
index 0000000..f5ff5a7
--- /dev/null
+++ b/examples/features/standard/message-counters/readme.md
@@ -0,0 +1,23 @@
+# JMS Message Counter Example
+
+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 use message counters to obtain message information for a JMS queue.
+
+The example will show how to configure sampling of message counters.
+
+We will produce and consume 1 message from a queue. Interleaved with the JMS operation, we will retrieve the queue's message counters at different times to display the metrics on the queue.
+
+## Example setup
+
+Message counter is configured in the broker configuration file broker.xml:
+
+    <message-counter-enabled>true</message-counter-enabled>
+    <message-counter-sample-period>2000</message-counter-sample-period>
+    <message-counter-max-day-history>2</message-counter-max-day-history>
+
+By default, message counters are not enabled (for performance reason). To enable them, set `message-counter-enabled` to `true`.
+Queues are sampled every 10 seconds by default. For this example we will reduce it to 2 seconds by setting `message-counter-sample-period` to `2000`.
+ActiveMQ Artemis holds in memory the message counters' history for a maximum number of days (10 by default). We can change the number of days the history is kept by setting the `message-counter-max-day-history` parameter.
+
+The sample period and the max day history parameters have a small impact on the performance of ActiveMQ Artemis (the resources taken to sample a queue are not available to the system's normal use). You should set these parameters accordingly to the use and throughput of your messages.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-counters/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-counters/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/message-counters/src/main/resources/activemq/server0/broker.xml
index cfb8262..ec9a8b9 100644
--- a/examples/features/standard/message-counters/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/message-counters/src/main/resources/activemq/server0/broker.xml
@@ -16,10 +16,8 @@ software distributed under the License is distributed on an
 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 ../../../../src/schema/artemis-server.xsd">
-
-   
-
+-->
+<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq ../../../../src/schema/artemis-configuration.xsd">
    <core xmlns="urn:activemq:core">
 
       <bindings-directory>./data/messaging/bindings</bindings-directory>
@@ -72,7 +70,7 @@ under the License.
          </address-setting>
       </address-settings>
 
-   <addresses>
+      <addresses>
          <address name="exampleQueue">
             <anycast>
                <queue name="exampleQueue"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-group/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group/pom.xml b/examples/features/standard/message-group/pom.xml
index 8ca2809..46cadb4 100644
--- a/examples/features/standard/message-group/pom.xml
+++ b/examples/features/standard/message-group/pom.xml
@@ -102,7 +102,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-
-</project>
+   <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/b77cdaf7/examples/features/standard/message-group/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group/readme.html b/examples/features/standard/message-group/readme.html
deleted file mode 100644
index 277d2f6..0000000
--- a/examples/features/standard/message-group/readme.html
+++ /dev/null
@@ -1,152 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis Message Group Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>Message Group Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-     <p>This example shows you how to configure and use message groups with ActiveMQ Artemis.</p>
-
-     <p>Message groups are sets of messages that has the following characteristics: </p>
-     <li>Messages in a message group share the same group id, i.e. they have same JMSXGroupID string property values.</li>
-     <li>Messages in a message group will be all delivered to no more than one of the queue's consumers. The consumer that receives the
-     first message of a group will receive all the messages that belong to the group.</li>
-
-     <p>You can make any message belong to a message group by setting its 'JMSXGroupID' string property to the group id.
-     In this example we create a message group 'Group-0'. And make such a message group of 10 messages. It also create two consumers on the queue
-     where the 10 'Group-0' group messages are to be sent. You can see that with message grouping enabled, all the 10 messages will be received by
-     the first consumer. The second consumer will receive none. </p>
-
-     <p>Alternatively, ActiveMQ's connection factories can be configured to <em>auto group</em> messages. By setting <code>autogroup</code> to </code>true</code> on the <code>ActiveMQConnectionFactory</code>
-        (or setting <code>&lt;autogroup&gt;true&lt;/autogroup&gt;</code> in <code>activemq-jms.xml</code>'s connection factory settings), a random unique id
-        will be picked to create a message group. <em>Every messages</em> sent by a producer created from this connection factory will automatically
-        be part of this message group.</p>
-
-     <h2>Example step-by-step</h2>
-
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-
-        <li>We create two consumers.</li>
-        <pre class="prettyprint">
-           <code>
-          MessageConsumer consumer1 = session.createConsumer(queue);
-          consumer1.setMessageListener(new SimpleMessageListener("consumer-1"));
-          MessageConsumer consumer2 = session.createConsumer(queue);
-          consumer2.setMessageListener(new SimpleMessageListener("consumer-2"));
-          </code>
-        </pre>
-
-        <li>We create and send 10 text messages with group id 'Group-0'</li>
-        <pre class="prettyprint">
-           <code>
-         int msgCount = 10;
-         TextMessage[] groupMessages = new TextMessage[msgCount];
-         for (int i = 0; i &lt; msgCount; i++)
-         {
-            groupMessages[i] = session.createTextMessage("Group-0 message " + i);
-            groupMessages[i].setStringProperty("JMSXGroupID", "Group-0");
-            producer.send(groupMessages[i]);
-            System.out.println("Sent message: " + groupMessages[i].getText());
-         }
-           </code>
-        </pre>
-
-        <li>We start the connection.</li>
-          <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>We check the group messages are received by only one consumer</li>
-        <pre class="prettyprint">
-           <code>
-         String trueReceiver = messageReceiverMap.get(groupMessages[0].getText());
-         for (TextMessage grpMsg : groupMessages)
-         {
-            String receiver = messageReceiverMap.get(grpMsg.getText());
-            if (!trueReceiver.equals(receiver))
-            {
-               System.out.println("Group message [" + grpMsg.getText() + "[ went to wrong receiver: " + receiver);
-               result = false;
-            }
-         }
-           </code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-
-     <h2>More information</h2>
-
-     <ul>
-         <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#message-grouping">Message Grouping chapter</a></li>
-     </ul>
-
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-group/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group/readme.md b/examples/features/standard/message-group/readme.md
new file mode 100644
index 0000000..b570bf3
--- /dev/null
+++ b/examples/features/standard/message-group/readme.md
@@ -0,0 +1,14 @@
+# Message Group Example
+
+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 configure and use message groups with ActiveMQ Artemis.
+
+Message groups are sets of messages that has the following characteristics:
+
+*   Messages in a message group share the same group id, i.e. they have same JMSXGroupID string property values.
+*   Messages in a message group will be all delivered to no more than one of the queue's consumers. The consumer that receives the first message of a group will receive all the messages that belong to the group.
+
+You can make any message belong to a message group by setting its 'JMSXGroupID' string property to the group id. In this example we create a message group 'Group-0'. And make such a message group of 10 messages. It also create two consumers on the queue where the 10 'Group-0' group messages are to be sent. You can see that with message grouping enabled, all the 10 messages will be received by the first consumer. The second consumer will receive none.
+
+Alternatively, ActiveMQ's connection factories can be configured to _auto group_ messages. By setting `autoGroup=true` in the client's URL a random unique id will be picked to create a message group. _Every messages_ sent by a producer created from this connection factory will automatically be part of this message group.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-group2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group2/pom.xml b/examples/features/standard/message-group2/pom.xml
index 5d38995..c447926 100644
--- a/examples/features/standard/message-group2/pom.xml
+++ b/examples/features/standard/message-group2/pom.xml
@@ -102,7 +102,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-
-</project>
+   <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/b77cdaf7/examples/features/standard/message-group2/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group2/readme.html b/examples/features/standard/message-group2/readme.html
deleted file mode 100644
index 983a442..0000000
--- a/examples/features/standard/message-group2/readme.html
+++ /dev/null
@@ -1,161 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis Message Group Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>Message Group Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
-     <p>This example shows you how to configure and use message groups via a connection factory with ActiveMQ Artemis.</p>
-
-     <p>Message groups are sets of messages that has the following characteristics: </p>
-     <li>Messages in a message group share the same group id, i.e. they have same JMSXGroupID string property values.</li>
-     <li>Messages in a message group will be all delivered to no more than one of the queue's consumers. The consumer that receives the
-     first message of a group will receive all the messages that belongs to the group.</li>
-
-     <p>You can make any message belong to a message group by setting a 'group-id' on the connection factory. All producers created via this connection factory will set that group id on its messages.
-     In this example we set the group id 'Group-0'on a connection factory and send messages via 2 different producers and check that only 1 consumer receives them. </p>
-
-     <p>Alternatively, ActiveMQ's connection factories can be configured to <em>auto group</em> messages. By setting <code>autogroup</code> to </code>true</code> on the <code>ActiveMQConnectionFactory</code>
-        (or setting <code>&lt;autogroup&gt;true&lt;/autogroup&gt;</code> in <code>activemq-jms.xml</code>'s connection factory settings), a random unique id
-        will be picked to create a message group. <em>Every messages</em> sent by a producer created from this connection factory will automatically
-        be part of this message group.</p>
-
-     <h2>Example step-by-step</h2>
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create 2 JMS message producers on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-          <code>
-              MessageProducer producer1 = session.createProducer(queue);
-
-              MessageProducer producer2 = session.createProducer(queue);</code>
-       </pre>
-
-        <li>We create two consumers.</li>
-        <pre class="prettyprint">
-           <code>
-          MessageConsumer consumer1 = session.createConsumer(queue);
-          consumer1.setMessageListener(new SimpleMessageListener("consumer-1"));
-          MessageConsumer consumer2 = session.createConsumer(queue);
-          consumer2.setMessageListener(new SimpleMessageListener("consumer-2"));
-          </code>
-        </pre>
-
-        <li>We create and send 10 text messages using each producer</li>
-        <pre class="prettyprint">
-           <code>
-         int msgCount = 10;
-         for (int i = 0; i < msgCount; i++)
-         {
-            TextMessage m = session.createTextMessage("producer1 message " + i);
-            producer1.send(m);
-            System.out.println("Sent message: " + m.getText());
-            TextMessage m2 = session.createTextMessage("producer2 message " + i);
-            producer2.send(m2);
-            System.out.println("Sent message: " + m2.getText());
-         }
-           </code>
-        </pre>
-
-        <li>We start the connection.</li>
-          <pre class="prettyprint">
-           <code>connection.start();</code>
-        </pre>
-
-        <li>We check the group messages are received by only one consumer</li>
-        <pre class="prettyprint">
-           <code>
-            String trueReceiver = messageReceiverMap.get("producer1 message " + 0);
-            for (int i = 0; i < msgCount; i++)
-            {
-               String receiver = messageReceiverMap.get("producer1 message " + i);
-               if (!trueReceiver.equals(receiver))
-               {
-                  System.out.println("Group message [producer1 message " + i + "] went to wrong receiver: " + receiver);
-                  result = false;
-               }
-               receiver = messageReceiverMap.get("producer2 message " + i);
-               if (!trueReceiver.equals(receiver))
-               {
-                  System.out.println("Group message [producer2 message " + i + "] went to wrong receiver: " + receiver);
-                  result = false;
-               }
-            }
-
-           </code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-
-     <h2>More information</h2>
-
-     <ul>
-         <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#message-grouping2">Message Grouping chapter</a></li>
-     </ul>
-
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-group2/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-group2/readme.md b/examples/features/standard/message-group2/readme.md
new file mode 100644
index 0000000..0a81e20
--- /dev/null
+++ b/examples/features/standard/message-group2/readme.md
@@ -0,0 +1,14 @@
+# Message Group Example
+
+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 configure and use message groups via a connection factory with ActiveMQ Artemis.
+
+Message groups are sets of messages that has the following characteristics:
+
+*   Messages in a message group share the same group id, i.e. they have same JMSXGroupID string property values.
+*   Messages in a message group will be all delivered to no more than one of the queue's consumers. The consumer that receives the first message of a group will receive all the messages that belongs to the group.
+
+You can make any message belong to a message group by setting a 'group-id' on the connection factory. All producers created via this connection factory will set that group id on its messages. In this example we set the group id 'Group-0'on a connection factory and send messages via 2 different producers and check that only 1 consumer receives them.
+
+Alternatively, ActiveMQ's connection factories can be configured to _auto group_ messages. By setting `autoGroup=true` in the client's URL a random unique id will be picked to create a message group. _Every messages_ sent by a producer created from this connection factory will automatically be part of this message group.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-priority/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-priority/pom.xml b/examples/features/standard/message-priority/pom.xml
index 4e89d0c..9c07a3b 100644
--- a/examples/features/standard/message-priority/pom.xml
+++ b/examples/features/standard/message-priority/pom.xml
@@ -102,7 +102,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-
-</project>
+   <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/b77cdaf7/examples/features/standard/message-priority/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-priority/readme.html b/examples/features/standard/message-priority/readme.html
deleted file mode 100644
index fc25297..0000000
--- a/examples/features/standard/message-priority/readme.html
+++ /dev/null
@@ -1,159 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis JMS Message Priority Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>JMS Message Priority Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
-     <p>This example shows how messages with different priorities are delivered in different orders.</p>
-
-     <p>The Message Priority property carries the delivery preference of sent messages. It can be set by the message's
-     standard header field 'JMSPriority' as defined in JMS specification version 1.1. The value is of type
-     integer, ranging from 0 (the lowest) to 9 (the highest). When messages are being delivered, their priorities
-     will effect their order of delivery. Messages of higher priorities will likely be delivered before those
-     of lower priorities. Messages of equal priorities are delivered in the natural order of their arrival at
-     their destinations. Please consult the JMS 1.1 specification for full details.</p>
-
-     <p>In this example, three messages are sent to a queue with different priorities. The first message is sent
-     with default priority (4), the second is sent with a higher priority (5), and the third has the highest
-     priority (9). At the receiving end, we will show the order of receiving of the three messages. You will
-     see that the third message, though last sent, will 'jump' forward to be the first one received. The second
-     is also received ahead of the message first sent, but behind the third message. The first message, regardless
-     of its being sent first, arrives last.</p>
-
-     <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
-
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre class="prettyprint">
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
-
-        <li>We Create a JMS Message Consumer.</li>
-        <pre class="prettyprint">
-           <code>
-           MessageConsumer redConsumer = session.createConsumer(queue);
-           redConsumer.setMessageListener(new SimpleMessageListener());
-           </code>
-        </pre>
-
-        <li>We Create three messages.</li>
-        <pre class="prettyprint">
-           <code>
-           TextMessage[] sentMessages = new TextMessage[3];
-           sentMessages[0] = session.createTextMessage("first message");
-           sentMessages[1] = session.createTextMessage("second message");
-           sentMessages[2] = session.createTextMessage("third message");
-           </code>
-        </pre>
-
-        <li>Send the Messages, each has a different priority.</li>
-        <pre class="prettyprint">
-           <code>
-           producer.send(sentMessages[0]);
-           System.out.println("Message sent: " + sentMessages[0].getText() + " with priority: " + sentMessages[0].getJMSPriority());
-           producer.send(sentMessages[1], DeliveryMode.NON_PERSISTENT, 5, 0);
-           System.out.println("Message sent: " + sentMessages[1].getText() + "with priority: " + sentMessages[1].getJMSPriority());
-           producer.send(sentMessages[2], DeliveryMode.NON_PERSISTENT, 9, 0);
-           System.out.println("Message sent: " + sentMessages[2].getText() + "with priority: " + sentMessages[2].getJMSPriority());
-           </code>
-        </pre>
-
-        <li>We start the connection now.</li>
-        <pre class="prettyprint">
-           <code>
-           connection.start();
-           </code>
-        </pre>
-
-        <li>We wait for message delivery completion</li>
-        <pre class="prettyprint">
-           <code>
-           Thread.sleep(5000);
-           </code>
-        </pre>
-
-        <li>We wait for message delivery completion</li>
-        <pre class="prettyprint">
-           <code>
-           for (int i = 0; i < 3; i++)
-           {
-              TextMessage rm = msgReceived.get(i);
-              if (!rm.getText().equals(sentMessages[2-i].getText()))
-              {
-                 System.err.println("Priority is broken!");
-                 result = false;
-              }
-           }
-           </code>
-        </pre>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/message-priority/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/message-priority/readme.md b/examples/features/standard/message-priority/readme.md
new file mode 100644
index 0000000..e48746a
--- /dev/null
+++ b/examples/features/standard/message-priority/readme.md
@@ -0,0 +1,9 @@
+# JMS Message Priority Example
+
+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 with different priorities are delivered in different orders.
+
+The Message Priority property carries the delivery preference of sent messages. It can be set by the message's standard header field 'JMSPriority' as defined in JMS specification version 1.1\. The value is of type integer, ranging from 0 (the lowest) to 9 (the highest). When messages are being delivered, their priorities will effect their order of delivery. Messages of higher priorities will likely be delivered before those of lower priorities. Messages of equal priorities are delivered in the natural order of their arrival at their destinations. Please consult the JMS 1.1 specification for full details.
+
+In this example, three messages are sent to a queue with different priorities. The first message is sent with default priority (4), the second is sent with a higher priority (5), and the third has the highest priority (9). At the receiving end, we will show the order of receiving of the three messages. You will see that the third message, though last sent, will 'jump' forward to be the first one received. The second is also received ahead of the message first sent, but behind the third message. The first message, regardless of its being sent first, arrives last.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/no-consumer-buffering/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/no-consumer-buffering/pom.xml b/examples/features/standard/no-consumer-buffering/pom.xml
index 7a56f51..dc1d5c5 100644
--- a/examples/features/standard/no-consumer-buffering/pom.xml
+++ b/examples/features/standard/no-consumer-buffering/pom.xml
@@ -102,6 +102,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-</project>
+   <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/b77cdaf7/examples/features/standard/no-consumer-buffering/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/no-consumer-buffering/readme.html b/examples/features/standard/no-consumer-buffering/readme.html
deleted file mode 100644
index 55a73a2..0000000
--- a/examples/features/standard/no-consumer-buffering/readme.html
+++ /dev/null
@@ -1,205 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis No Consumer Buffering Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>No Consumer Buffering Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
-     <p>By default, ActiveMQ Artemis consumers buffer messages from the server in a client side buffer
-     before actual delivery actually occurs.</p>
-     <p>This improves performance since otherwise every time you called receive() or had processed the last
-     message in a MessageListener onMessage() method, the ActiveMQ Artemis client would have to go the
-     server to request the next message involving a network round trip for every message reducing performance.</p>
-     <p>Therefore, by default, ActiveMQ Artemis pre-fetches messages into a buffer on each consumer. The total maximum size of
-     messages in bytes that will be buffered on each consumer is determined by the <code>consumer-window-size</code>
-     parameter on the connection factory.</p>
-     <p>In some cases it is not desirable to buffer any messages on the client side consumer.</p>
-     <p>An example would be an order queue which had multiple consumers that processed orders from the queue.
-     Each order takes a significant time to process, but each one should be processed in a timely fashion.</p>
-     <p>If orders were buffered in each consumer, and a new consumer was added that consumer would not be able
-     to process orders which were already in the client side buffer of another consumer.</p>
-     <p>To turn off client side buffering of messages, set <code>consumer-window-size</code> to zero.</p>
-
-     <p>With ActiveMQ Artemis you can specify a maximum consume rate at which a JMS MessageConsumer will consume messages.
-     This can be specified when creating or deploying the connection factory. See <code>activemq-jms.xml</code></p>
-     <h2>Example step-by-step</h2>
-     <p>In this example we specify a <code>consumer-window-size</code> of <code>0</code> bytes in the <code>activemq-jms.xml</code>
-     file when deploying the connection factory:</p>
-     <pre class="prettyprint">
-     <code>
-   &lt;connection-factory name="ConnectionFactory"&gt;
-      &lt;connector-ref&gt;netty-connector&lt;/connector-ref&gt;
-      &lt;entries&gt;
-         &lt;entry name="ConnectionFactory"/&gt;
-      &lt;/entries&gt;
-
-      &lt;!-- We set the consumer window size to 0, which means messages are not buffered at all
-      on the client side --&gt;
-      &lt;consumer-window-size&gt;0&lt;/consumer-window-size&gt;
-
-   &lt;/connection-factory&gt;
-     </code>
-     </pre>
-     <p>We create a consumer on a queue and send 10 messages to it. We then create another consumer on
-     the same queue.</p>
-     <p>We then consume messages from each consumer in a semi-random order. We note that the messages
-     are consumed in the order they were sent.</p>
-     <p>If the messages had been buffered in each consumer they would not be available to be consumed
-     in an order determined afer delivery.</p>
-
-     <ol>
-        <li>Create an initial context to perform the JNDI lookup.</li>
-        <pre class="prettyprint">
-           <code>initialContext = getContext(0);</code>
-        </pre>
-
-        <li>Perfom a lookup on the queue</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>Perform a lookup on the Connection Factory</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>Create a JMS Connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>Create a JMS Session</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
-
-        <li>Create a JMS MessageProducer</li>
-        <pre class="prettyprint">
-          <code>MessageProducer producer = session.createProducer(queue);</code>
-        </pre>
-
-        <li>Create a JMS MessageConsumer</li>
-        <pre class="prettyprint">
-           <code>MessageConsumer consumer1 = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>Start the connection</li>
-
-        <pre class="prettyprint">
-           <code>
-     connection.start();
-           </code>
-        </pre>
-
-
-        <li>Send 10 messages to the queue</li>
-        <pre class="prettyprint">
-           <code>
-     final int numMessages = 10;
-
-     for (int i = 0; i < numMessages; i++)
-     {
-        TextMessage message = session.createTextMessage("This is text message: " + i);
-
-        producer.send(message);
-     }
-           </code>
-        </pre>
-
-        <li>Create another JMS MessageConsumer on the same queue.</li>
-        <pre class="prettyprint">
-           <code>MessageConsumer consumer2 = session.createConsumer(queue);</code>
-        </pre>
-
-        <li>Consume three messages from consumer2</li>
-
-        <pre class="prettyprint">
-           <code>
-   for (int i = 0; i < 3; i++)
-   {
-      TextMessage message = (TextMessage)consumer2.receive(2000);
-
-      System.out.println("Consumed message from consumer2: " + message.getText());
-   }
-           </code>
-        </pre>
-
-        <li>Consume five messages from consumer1</li>
-
-        <pre class="prettyprint">
-           <code>
-   for (int i = 0; i < 5; i++)
-   {
-      TextMessage message = (TextMessage)consumer1.receive(2000);
-
-      System.out.println("Consumed message from consumer1: " + message.getText());
-   }
-           </code>
-        </pre>
-
-        <li>Consume two more messages from consumer2</li>
-
-        <pre class="prettyprint">
-           <code>
-   for (int i = 0; i < 2; i++)
-   {
-      TextMessage message = (TextMessage)consumer1.receive(2000);
-
-      System.out.println("Consumed message from consumer2: " + message.getText());
-   }
-           </code>
-        </pre>
-
-
-        <li>Be sure to close our resources!</li>
-
-        <pre class="prettyprint">
-           <code>
-           finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-     </ol>
-
-     <h2>More information</h2>
-
-     <ul>
-         <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#flow-control.consumer.window">Consumer Window-Based Flow Control chapter</a></li>
-     </ul>
-
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/no-consumer-buffering/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/no-consumer-buffering/readme.md b/examples/features/standard/no-consumer-buffering/readme.md
new file mode 100644
index 0000000..5ae359b
--- /dev/null
+++ b/examples/features/standard/no-consumer-buffering/readme.md
@@ -0,0 +1,29 @@
+# No Consumer Buffering Example
+
+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.
+
+By default, ActiveMQ Artemis consumers buffer messages from the broker in a client side buffer before actual delivery actually occurs.
+
+This improves performance since otherwise every time you called receive() or had processed the last message in a MessageListener onMessage() method, the ActiveMQ Artemis client would have to go the broker to request the next message involving a network round trip for every message reducing performance.
+
+Therefore, by default, ActiveMQ Artemis pre-fetches messages into a buffer on each consumer. The total maximum size of messages in bytes that will be buffered on each consumer is determined by the `consumerWindowSize` parameter on the connection URL.
+
+In some cases it is not desirable to buffer any messages on the client side consumer.
+
+An example would be an order queue which had multiple consumers that processed orders from the queue. Each order takes a significant time to process, but each one should be processed in a timely fashion.
+
+If orders were buffered in each consumer, and a new consumer was added that consumer would not be able to process orders which were already in the client side buffer of another consumer.
+
+To turn off client side buffering of messages, set `consumerWindowSize` to zero.
+
+With ActiveMQ Artemis you can specify a maximum consume rate at which a JMS MessageConsumer will consume messages. This can be specified when configuring the connection URL.
+
+## Example step-by-step
+
+In this example we specify a `consumerWindowSize` of `0` bytes on the connection URL in `jndi.properties`.
+
+We create a consumer on a queue and send 10 messages to it. We then create another consumer on the same queue.
+
+We then consume messages from each consumer in a semi-random order. We note that the messages are consumed in the order they were sent.
+
+If the messages had been buffered in each consumer they would not be available to be consumed in an order determined after delivery.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/paging/pom.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/paging/pom.xml b/examples/features/standard/paging/pom.xml
index 40cdf91..aa304fb 100644
--- a/examples/features/standard/paging/pom.xml
+++ b/examples/features/standard/paging/pom.xml
@@ -102,7 +102,23 @@ under the License.
                </dependency>
             </dependencies>
          </plugin>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+         </plugin>
       </plugins>
    </build>
-
-</project>
+   <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/b77cdaf7/examples/features/standard/paging/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/standard/paging/readme.html b/examples/features/standard/paging/readme.html
deleted file mode 100644
index 7c74320..0000000
--- a/examples/features/standard/paging/readme.html
+++ /dev/null
@@ -1,187 +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.
--->
-
-<html>
-  <head>
-    <title>ActiveMQ Artemis Paging Example</title>
-    <link rel="stylesheet" type="text/css" href="../../../common/common.css" />
-    <link rel="stylesheet" type="text/css" href="../../../common/prettify.css" />
-    <script type="text/javascript" src="../../../common/prettify.js"></script>
-  </head>
-  <body onload="prettyPrint()">
-     <h1>Paging Example</h1>
-
-     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
-
-
-     <p>This example shows how ActiveMQ Artemis would avoid running out of memory resources by paging messages.</p>
-     <p>A maxSize can be specified per Destination via the destinations settings configuration file (broker.xml).</p>
-     <p>When messages routed to an address exceed the specified maxSize the server will begin to write messages to the file
-     system, this is called paging. This will continue to occur until messages have been delivered to consumers and subsequently
-     acknowledged freeing up memory. Messages will then be read from the file system , i.e. depaged, and routed as normal. </p>
-     <p>Acknowledgement plays an important factor on paging as messages will stay on the file system until the memory is released
-     so it is important to make sure that the client acknowledges its messages.</p>
-
-
-     <h2>Example step-by-step</h2>
-
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre class="prettyprint">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI. pagingQueue is configured to hold a very limited number of bytes in memory</li>
-        <pre class="prettyprint">
-           <code>Queue pageQueue = (Queue) initialContext.lookup("/queue/pagingQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI.</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We create a JMS connection</li>
-        <pre class="prettyprint">
-           <code>connection = cf.createConnection();</code>
-        </pre>
-
-        <li>We create a JMS session. The session is created as non transacted. We will use client acknowledgement on this example.</li>
-        <pre class="prettyprint">
-           <code>Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);</code>
-        </pre>
-
-
-         <li>Create a JMS Message Producer for pageQueueAddress</li>
-         <pre class="prettyprint"><code>
-         MessageProducer pageMessageProducer = session.createProducer(pageQueue);
-         </pre></code>
-
-         <li>We don't need persistent messages in order to use paging. (This step is optional)</li>
-         <pre class="prettyprint"><code>
-         pageMessageProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-         </pre></code>
-
-         <li>Create a Binary Bytes Message with 10K arbitrary bytes</li>
-         <pre class="prettyprint"><code>
-         BytesMessage message = session.createBytesMessage();
-         message.writeBytes(new byte[10 * 1024]);
-         </pre></code>
-
-
-         <li>Send only 20 messages to the Queue. This will be already enough for pagingQueue. Look at ./paging/config/activemq-queues.xml for the config.</li>
-         <pre class="prettyprint"><code>
-         for (int i = 0; i < 20; i++)
-         {
-            pageMessageProducer.send(message);
-         }
-         </pre></code>
-
-         <li>Create a JMS Message Producer</li>
-         <pre class="prettyprint"><code>
-         MessageProducer messageProducer = session.createProducer(queue);
-         </pre></code>
-
-         <li>We don't need persistent messages in order to use paging. (This step is optional)</li>
-         <pre class="prettyprint"><code>
-         messageProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
-         </pre></code>
-
-         <li>Send the message for about 30K, which should be over the memory limit imposed by the server</li>
-         <pre class="prettyprint"><code>
-         for (int i = 0; i < 30000; i++)
-         {
-            messageProducer.send(message);
-         }
-         </pre></code>
-
-         <li>if you pause the example here, you will several files under ./build/data/paging</li>
-
-         <pre class="prettyprint"><code>
-         // Thread.sleep(30000); // if you want to just our of curiosity, you can sleep here and inspect the created files just for
-         </pre></code>
-
-
-         <li>Create a JMS Message Consumer</li>
-         <pre class="prettyprint"><code>
-         MessageConsumer messageConsumer = session.createConsumer(queue);
-         </pre></code>
-
-
-         <li>Start the JMS Connection. This step will activate the subscribers to receive messages.</li>
-         <pre class="prettyprint"><code>
-         connection.start();
-         </pre></code>
-
-
-         <li>Receive the messages. It's important to ACK for messages as ActiveMQ Artemis will not read messages from paging until messages are ACKed</li>
-
-         <pre class="prettyprint"><code>
-         for (int i = 0; i < 30000; i++)
-         {
-            message = (BytesMessage)messageConsumer.receive(1000);
-
-            if (i % 1000 == 0)
-            {
-               System.out.println("Received " + i + " messages");
-
-               message.acknowledge();
-            }
-         }
-         </pre></code>
-
-         <li>Receive the messages from the Queue names pageQueue. Create the proper consumer for that.</li>
-         <pre class="prettyprint"><code>
-         messageConsumer.close();
-         messageConsumer = session.createConsumer(pageQueue);
-
-         for (int i = 0; i < 20; i++)
-         {
-            message = (BytesMessage)messageConsumer.receive(1000);
-
-            System.out.println("Received message " + i + " from pageQueue");
-
-            message.acknowledge();
-         }
-         </pre></code>
-
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre class="prettyprint">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-
-     </ol>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b77cdaf7/examples/features/standard/paging/readme.md
----------------------------------------------------------------------
diff --git a/examples/features/standard/paging/readme.md b/examples/features/standard/paging/readme.md
new file mode 100644
index 0000000..f0697e1
--- /dev/null
+++ b/examples/features/standard/paging/readme.md
@@ -0,0 +1,11 @@
+# Paging Example
+
+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 ActiveMQ Artemis would avoid running out of memory resources by paging messages.
+
+A maximum size can be specified per address via the address settings in the configuration file (broker.xml).
+
+When messages routed to an address exceed the specified max-size-bytes the broker will begin to write messages to the file system, this is called paging. This will continue to occur until messages have been delivered to consumers and subsequently acknowledged freeing up memory. Messages will then be read from the file system , i.e. depaged, and routed as normal.
+
+Acknowledgement plays an important factor on paging as messages will stay on the file system until the memory is released so it is important to make sure that the client acknowledges its messages.
\ No newline at end of file


Mime
View raw message