Author: buildbot
Date: Thu Sep 25 15:20:55 2014
New Revision: 923543

Log:
Production update by buildbot for activemq

Modified:
    websites/production/activemq/content/cache/main.pageCache
    websites/production/activemq/content/how-can-i-monitor-activemq.html
    websites/production/activemq/content/rest.html

Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/activemq/content/how-can-i-monitor-activemq.html
==============================================================================
--- websites/production/activemq/content/how-can-i-monitor-activemq.html 
(original)
+++ websites/production/activemq/content/how-can-i-monitor-activemq.html Thu 
Sep 25 15:20:55 2014
@@ -72,21 +72,7 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 
id="HowcanImonitorActiveMQ-HowcanImonitorActiveMQ">How can I monitor 
ActiveMQ</h2>
-<p>In ActiveMQ 4.x you can monitor the broker to see what destinations are 
being used, their activity along with connections and subscriptions using the 
following tools</p>
-
-<ul><li><a shape="rect" href="jmx.html">JMX</a> and a JMX console such as <a 
shape="rect" class="external-link" 
href="http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html"; 
rel="nofollow">jConsole</a></li><li>The <a shape="rect" 
href="web-console.html">Web Console</a></li><li>the <a shape="rect" 
href="advisory-message.html">Advisory Message</a> feature (using JMS messages 
to monitor the system)</li><li>The <a shape="rect" 
href="command-agent.html">Command Agent</a>; ActiveMQ.Agent topic that you 
query for status</li><li>The <a shape="rect" 
href="visualisation.html">Visualisation</a> plug-in</li><li>The <a shape="rect" 
class="external-link" 
href="http://activemq.apache.org/statisticsplugin.html";>Statistics</a> plug-in 
(from 5.3)</li></ul>
-
-
-<h3 id="HowcanImonitorActiveMQ-ThirdPartyTools">Third Party Tools</h3>
-
-<ul><li><a shape="rect" class="external-link" 
href="http://www.ttmsolutions.com/Transactional_Software_Solutions/Active_Monitor_AMon.php";
 rel="nofollow">ActiveMQ Monitor (AMon)</a></li><li><a shape="rect" 
class="external-link" href="http://sourceforge.net/projects/activemqbrowser/"; 
rel="nofollow">Apache ActiveMQBrowser</a></li><li><a shape="rect" 
class="external-link" 
href="http://www.hermesjms.com/confluence/display/HJMS/Home"; 
rel="nofollow">HermesJMS</a></li><li><a shape="rect" class="external-link" 
href="http://www.soapui.org/JMS/working-with-jms-messages.html"; 
rel="nofollow">HermesJMS/soapUI</a></li><li><a shape="rect" 
class="external-link" 
href="http://www.hyperic.com/products/open-source-systems-monitoring"; 
rel="nofollow">Hyperic HQ</a> and <a shape="rect" class="external-link" 
href="http://www.hyperic.com/products/enterprise-systems-monitoring"; 
rel="nofollow">Hyperic HQ Enterprise</a></li><li><a shape="rect" 
class="external-link" href="http://fusesource.com/products/fuse-hq/";
  rel="nofollow">FuseHQ</a> (based on Hyperic HQ Enterprise)</li><li><a 
shape="rect" class="external-link" href="http://www.itko.com/products/jms.jsp"; 
rel="nofollow">iTKO LISA Test</a></li><li><a shape="rect" class="external-link" 
href="https://cwiki.apache.org/GMOxDOC11/geronimo-administration-console.html#GeronimoAdministrationConsole-JMSServer";>Geronimo
 Administration Console</a> (JMS Resources)</li></ul>
-
-
-<h3 id="HowcanImonitorActiveMQ-SeeAlso">See Also</h3>
-
-<ul><li><a shape="rect" 
href="how-can-i-monitor-the-connection-with-the-broker.html">How can I monitor 
the connection with the broker</a></li></ul>
-</div>
+<div class="wiki-content maincontent"><h2 
id="HowcanImonitorActiveMQ-HowcanImonitorActiveMQ">How can I monitor 
ActiveMQ</h2><p>Starting with ActiveMQ 5.8.0&#160;<a shape="rect" 
class="external-link" href="http://www.jolokia.org/"; rel="nofollow">Jolokia</a> 
is bundled which provides a&#160;RESTful interface to ActiveMQ's JMX 
capabilities.</p><p>In ActiveMQ 4.x you can monitor the broker to see what 
destinations are being used, their activity along with connections and 
subscriptions using the following tools</p><ul><li><a shape="rect" 
href="jmx.html">JMX</a> and a JMX console such as <a shape="rect" 
class="external-link" 
href="http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html"; 
rel="nofollow">jConsole</a></li><li>The <a shape="rect" 
href="web-console.html">Web Console</a></li><li>the <a shape="rect" 
href="advisory-message.html">Advisory Message</a> feature (using JMS messages 
to monitor the system)</li><li>The <a shape="rect" 
href="command-agent.html">Command Agent</a>
 ; ActiveMQ.Agent topic that you query for status</li><li>The <a shape="rect" 
href="visualisation.html">Visualisation</a> plug-in</li><li>The <a shape="rect" 
class="external-link" 
href="http://activemq.apache.org/statisticsplugin.html";>Statistics</a> plug-in 
(from 5.3)</li></ul><h3 id="HowcanImonitorActiveMQ-ThirdPartyTools">Third Party 
Tools</h3><ul><li><a shape="rect" class="external-link" 
href="https://github.com/jmxtrans/jmxtrans"; rel="nofollow">jmxtrans</a> which 
can be used to continuously query ActiveMQ via JMX and write to a chosen 
output. For instance, write to a graphite database file which can then be used 
to graph trends over time and be queried by Nagios to alarm should your 
thresholds be exceeded.</li><li><a shape="rect" class="external-link" 
href="http://www.ttmsolutions.com/Transactional_Software_Solutions/Active_Monitor_AMon.php";
 rel="nofollow">ActiveMQ Monitor (AMon)</a></li><li><a shape="rect" 
class="external-link" href="http://sourceforge.net/projects/activemqbrow
 ser/" rel="nofollow">Apache ActiveMQBrowser</a></li><li><a shape="rect" 
class="external-link" 
href="http://www.hermesjms.com/confluence/display/HJMS/Home"; 
rel="nofollow">HermesJMS</a></li><li><a shape="rect" class="external-link" 
href="http://www.soapui.org/JMS/working-with-jms-messages.html"; 
rel="nofollow">HermesJMS/soapUI</a></li><li><a shape="rect" 
class="external-link" 
href="http://www.hyperic.com/products/open-source-systems-monitoring"; 
rel="nofollow">Hyperic HQ</a> and <a shape="rect" class="external-link" 
href="http://www.hyperic.com/products/enterprise-systems-monitoring"; 
rel="nofollow">Hyperic HQ Enterprise</a></li><li><a shape="rect" 
class="external-link" href="http://fusesource.com/products/fuse-hq/"; 
rel="nofollow">FuseHQ</a> (based on Hyperic HQ Enterprise)</li><li><a 
shape="rect" class="external-link" href="http://www.itko.com/products/jms.jsp"; 
rel="nofollow">iTKO LISA Test</a></li><li><a shape="rect" class="external-link" 
href="https://cwiki.apache.org/GMOxDOC11/geroni
 
mo-administration-console.html#GeronimoAdministrationConsole-JMSServer">Geronimo
 Administration Console</a> (JMS Resources)</li></ul><h3 
id="HowcanImonitorActiveMQ-SeeAlso">See Also</h3><ul><li><a shape="rect" 
href="how-can-i-monitor-the-connection-with-the-broker.html">How can I monitor 
the connection with the broker</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/activemq/content/rest.html
==============================================================================
--- websites/production/activemq/content/rest.html (original)
+++ websites/production/activemq/content/rest.html Thu Sep 25 15:20:55 2014
@@ -81,78 +81,19 @@
   <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><p>ActiveMQ implements a RESTful API to 
messaging which allows any web capable device to publish or consume messages 
using a regular HTTP POST or GET.</p>
-
-<p>If you are interested in messaging directly from web browsers you might 
wanna check out our <a shape="rect" href="ajax.html">Ajax</a> or <a 
shape="rect" href="websockets.html">WebSockets</a> support or try <a 
shape="rect" href="web-samples.html">running the REST examples</a></p>
-
-<h2 id="REST-MappingofRESTtoJMS">Mapping of REST to JMS</h2>
-
-<p>To publish a message use a HTTP POST. To consume a message use HTTP DELETE 
or GET.</p>
-
-<p>ActiveMQ has a Servlet that takes care of the integration between HTTP and 
the ActiveMQ dispatcher.</p>
-
-<p>You can map a URI to the servlet and then use the relative part of the URI 
as the topic or queue name. e.g. you could HTTP POST to</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-http://www.acme.com/queue/orders/input
+<div class="wiki-content maincontent"><p>ActiveMQ implements a RESTful API to 
messaging which allows any web capable device to publish or consume messages 
using a regular HTTP POST or GET.</p><p>If you are interested in messaging 
directly from web browsers you might wanna check out our <a shape="rect" 
href="ajax.html">Ajax</a> or <a shape="rect" 
href="websockets.html">WebSockets</a> support or try <a shape="rect" 
href="web-samples.html">running the REST examples</a></p><h2 
id="REST-MappingofRESTtoJMS">Mapping of REST to JMS</h2><p>To publish a message 
use a HTTP POST. To consume a message use HTTP DELETE or GET.</p><p>ActiveMQ 
has a Servlet that takes care of the integration between HTTP and the ActiveMQ 
dispatcher.</p><p>You can map a URI to the servlet and then use the relative 
part of the URI as the topic or queue name. e.g. you could HTTP POST to</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[http://www.acme.com/queue/orders/input
 ]]></script>
-</div></div>
-
-<p>which would publish the contents of the HTTP POST to the orders.input queue 
on JMS.</p>
-
-<p>Similarly you could perform a HTTP DELETE GET on the above URL to read from 
the same queue. In this case we will map the MessageServlet from ActiveMQ to 
the URI </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-http://www.acme.com/queue
+</div></div><p>which would publish the contents of the HTTP POST to the 
orders.input queue on JMS.</p><p>Similarly you could perform a HTTP DELETE GET 
on the above URL to read from the same queue. In this case we will map the 
MessageServlet from ActiveMQ to the URI</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[http://www.acme.com/queue
 ]]></script>
-</div></div>
-
-<p>and configure it to accept the URI as a queue destination. We can do 
similar things to support topic destinations too.</p>
-
-<p>We can use the HTTP session to denote a unique publisher or consumer.</p>
-
-<p>Note that strict REST requires that GET be a read only operation; so 
strictly speaking we should not use GET to allow folks to consume messages. 
Though we allow this as it simplifies HTTP/DHTML/Ajax integration somewhat.</p>
-
-<p>For a more cleaner mapping of a simple transfer protocol to different 
languages, you might wanna take a look at <a shape="rect" 
href="stomp.html">Stomp</a>.</p>
-
-<h2 id="REST-Defaultconfiguration">Default configuration</h2>
-
-<p>Until version 5.8, REST API was part of the <a shape="rect" 
href="web-samples.html">Web Samples</a> and was mapped to <a shape="rect" 
class="external-link" href="http://localhost:8161/demo/message"; 
rel="nofollow">http://localhost:8161/demo/message</a> url. From 5.8 onwards, 
the API is available by default at <a shape="rect" class="external-link" 
href="http://localhost:8161/api/message"; 
rel="nofollow">http://localhost:8161/api/message</a> url. Also, starting with 
5.8, web server is secured by default (see <a shape="rect" 
href="web-console.html">Web Console</a> for more information), so have that in 
mind when trying to use it. Examples below will assume new api location and 
secured web server.</p>
-
-<h3 id="REST-Producing">Producing</h3>
-
-<p>You cam produce by sending a POST request to the server, like</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>and configure it to accept the URI as a queue destination. We 
can do similar things to support topic destinations too.</p><p>We can use the 
HTTP session to denote a unique publisher or consumer.</p><p>Note that strict 
REST requires that GET be a read only operation; so strictly speaking we should 
not use GET to allow folks to consume messages. Though we allow this as it 
simplifies HTTP/DHTML/Ajax integration somewhat.</p><p>For a more cleaner 
mapping of a simple transfer protocol to different languages, you might wanna 
take a look at <a shape="rect" href="stomp.html">Stomp</a>.</p><h2 
id="REST-Defaultconfiguration">Default configuration</h2><p>Until version 5.8, 
REST API was part of the <a shape="rect" href="web-samples.html">Web 
Samples</a> and was mapped to <a shape="rect" class="external-link" 
href="http://localhost:8161/demo/message"; 
rel="nofollow">http://localhost:8161/demo/message</a> url. From 5.8 onwards, 
the API is available by default at <a shape="rect" clas
 s="external-link" href="http://localhost:8161/api/message"; 
rel="nofollow">http://localhost:8161/api/message</a> url. Also, starting with 
5.8, web server is secured by default (see <a shape="rect" 
href="web-console.html">Web Console</a> for more information), so have that in 
mind when trying to use it. Examples below will assume new api location and 
secured web server.</p><h3 id="REST-Producing">Producing</h3><p>You cam produce 
by sending a POST request to the server, like</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[curl -u admin:admin -d 
&quot;body=message&quot; 
http://localhost:8161/api/message/TEST?type=queue]]></script>
-</div></div>
-
-<h3 id="REST-Timeouts">Timeouts</h3>
-
-<p>When reading from a queue we might not have any messages. We can use a 
timeout query parameter to indicate how long we are prepared to wait for a 
message to arrive. This allows us to poll or block until a message arrives.</p>
-
-<p>Couple this with HTTP 1.1 keep-alive sockets and pipeline processing we can 
have efficient access to JMS over HTTP. </p>
-
-<p>Obviously if your client is Java then using ActiveMQ's JMS API is the 
fastest and most efficient way to work with the message broker; however, if you 
are not using Java or prefer the simplicity of HTTP then it should be fairly 
efficient, especially if your HTTP client supports keep-alive sockets and 
pipeline processing.</p>
-
-<h3 id="REST-Consuming">Consuming</h3>
-
-<p>When consuming messages using the REST API, you have to keep session alive 
between GET requests, or you'll create a separate consumer for every request 
and due to prefetch limit your succeeding call will hang.</p>
-
-<p>For example, you can use <code>wget</code> to consume messages, like 
this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-wget --user admin --password admin --save-cookies cookies.txt --load-cookies 
cookies.txt --keep-session-cookies  
http://localhost:8161/api/message/TEST1?type=queue
+</div></div><h3 id="REST-Timeouts">Timeouts</h3><p>When reading from a queue 
we might not have any messages. We can use a timeout query parameter to 
indicate how long we are prepared to wait for a message to arrive. This allows 
us to poll or block until a message arrives.</p><p>Couple this with HTTP 1.1 
keep-alive sockets and pipeline processing we can have efficient access to JMS 
over HTTP.</p><p>Obviously if your client is Java then using ActiveMQ's JMS API 
is the fastest and most efficient way to work with the message broker; however, 
if you are not using Java or prefer the simplicity of HTTP then it should be 
fairly efficient, especially if your HTTP client supports keep-alive sockets 
and pipeline processing.</p><h3 id="REST-Consuming">Consuming</h3><p>When 
consuming messages using the REST API, you have to keep session alive between 
GET requests, or you'll create a separate consumer for every request and due to 
prefetch limit your succeeding call will hang.</p><p>For example, y
 ou can use <code>wget</code> to consume messages, like this:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[wget --user admin --password admin 
--save-cookies cookies.txt --load-cookies cookies.txt --keep-session-cookies  
http://localhost:8161/api/message/TEST1?type=queue
 ]]></script>
-</div></div>
-
-<p>Also, if you plan to have multiple consumer using REST, it's advisable to 
set prefetch size to 1 so all consumers have an equal chance of getting the 
message. You can do that by passing a special parameter to the 
<code>MessageServlet</code></p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-    &lt;servlet&gt;
+</div></div><p>Also, if you plan to have multiple consumer using REST, it's 
advisable to set prefetch size to 1 so all consumers have an equal chance of 
getting the message. You can do that by passing a special parameter to the 
<code>MessageServlet</code></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[    &lt;servlet&gt;
         &lt;servlet-name&gt;MessageServlet&lt;/servlet-name&gt;       
         
&lt;servlet-class&gt;org.apache.activemq.web.MessageServlet&lt;/servlet-class&gt;
         &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
@@ -162,60 +103,22 @@ wget --user admin --password admin --sav
         &lt;/init-param&gt;
     &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>in the <code>webapps/demo/WEB-INF/web.xml</code></p>
-
-<h3 id="REST-Consumingwithoutsessions">Consuming without sessions</h3>
-
-<p>Since 5.2.0 you can use <code>clientId</code> parameter to avoid storing 
actual JMS consumer in the request session. When using this approach, you don't 
need to keep sessions alive between requests, you just need to use the same 
<code>clientId</code> every time. </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-wget --user admin --password admin 
http://localhost:8161/api/message/test?type=queue&amp;clientId=consumerA
+</div></div><p>in the <code>webapps/demo/WEB-INF/web.xml</code></p><h3 
id="REST-Consumingwithoutsessions">Consuming without sessions</h3><p>Since 
5.2.0 you can use <code>clientId</code> parameter to avoid storing actual JMS 
consumer in the request session. When using this approach, you don't need to 
keep sessions alive between requests, you just need to use the same 
<code>clientId</code> every time.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[wget --user admin --password admin 
http://localhost:8161/api/message/test?type=queue&amp;clientId=consumerA
 ]]></script>
-</div></div>
-
-<p>Every such call will use the same JMS consumer and deliver messages send to 
it by the broker.</p>
-
-<p>In 5.4.1 it's also possible to unsubscribe the client. It's done by sending 
a POST call with <code>clientId</code> and <code>action=unsubscribe</code> 
parameters to the server, like</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>Every such call will use the same JMS consumer and deliver 
messages send to it by the broker.</p><p>In 5.4.1 it's also possible to 
unsubscribe the client. It's done by sending a POST call with 
<code>clientId</code> and <code>action=unsubscribe</code> parameters to the 
server, like</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[http://localhost:8161/demo/message/test?clientId=consumerA&amp;action=unsubscribe]]></script>
-</div></div>
-
-<h3 id="REST-Consumingwithselectors">Consuming with selectors</h3>
-
-<p>As of ActiveMQ 5.4.0, you can use selectors when consuming using REST 
protocol. To do that, just specify the appropriate header with selector. To 
define a selector for the consumer, you have to provide it in an appropriate 
HTTP header. By default selector header name is <code>selector</code>, so the 
following example</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-wget  --user admin --password admin --save-cookies cookies.txt --load-cookies 
cookies.txt --keep-session-cookies  --header=&quot;selector: test=2&quot; 
http://localhost:8161/api/message/test?type=queue
+</div></div><h3 id="REST-Consumingwithselectors">Consuming with 
selectors</h3><p>As of ActiveMQ 5.4.0, you can use selectors when consuming 
using REST protocol. To do that, just specify the appropriate header with 
selector. To define a selector for the consumer, you have to provide it in an 
appropriate HTTP header. By default selector header name is 
<code>selector</code>, so the following example</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[wget  --user admin --password admin 
--save-cookies cookies.txt --load-cookies cookies.txt --keep-session-cookies  
--header=&quot;selector: test=2&quot; 
http://localhost:8161/api/message/test?type=queue
 ]]></script>
-</div></div>
-
-<p>should consume only messages that have <code>test</code> property set to 
<code>2</code>.</p>
-
-<p>You can change the name of the selector header using the 
<code>org.apache.activemq.selectorName</code> Servlet context property in 
<code>WEB-INF/web.xml</code>, such as</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-    &lt;context-param&gt;
+</div></div><p>should consume only messages that have <code>test</code> 
property set to <code>2</code>.</p><p>You can change the name of the selector 
header using the <code>org.apache.activemq.selectorName</code> Servlet context 
property in <code>WEB-INF/web.xml</code>, such as</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[    &lt;context-param&gt;
         &lt;param-name&gt;org.apache.activemq.selectorName&lt;/param-name&gt;
         &lt;param-value&gt;activemq-selector&lt;/param-value&gt;
     &lt;/context-param&gt;
 ]]></script>
-</div></div>
-
-<p>For more info, take a look at <a shape="rect" class="external-link" 
href="http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java?r=HEAD";
 rel="nofollow">RestTest</a></p>
-
-<h3 id="REST-ContentTypes">Content Types</h3>
-
-<p>By default messages are sent to the consumers with <code>text/xml</code> 
content type. Your REST-based application may expect JSON response instead of 
XML one. In that case, you can configure the servlet to send responses back by 
adding something like this</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-    &lt;servlet&gt;
+</div></div><p>For more info, take a look at <a shape="rect" 
class="external-link" 
href="http://fisheye6.atlassian.com/browse/activemq/trunk/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java?r=HEAD";
 rel="nofollow">RestTest</a></p><h3 id="REST-ContentTypes">Content 
Types</h3><p>By default messages are sent to the consumers with 
<code>text/xml</code> content type. Your REST-based application may expect JSON 
response instead of XML one. In that case, you can configure the servlet to 
send responses back by adding something like this</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[    &lt;servlet&gt;
         &lt;servlet-name&gt;MessageServlet&lt;/servlet-name&gt;
         
&lt;servlet-class&gt;org.apache.activemq.web.MessageServlet&lt;/servlet-class&gt;
         &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
@@ -225,51 +128,21 @@ wget  --user admin --password admin --sa
         &lt;/init-param&gt; 
     &lt;/servlet&gt;
 ]]></script>
-</div></div>
-
-<p>to your <code>WEB-INF/web.xml</code>.</p>
-
-<p>A default content type can also be overridden using request headers. 
Specifying <code>xml=true</code> or <code>json=true</code> URL parameter you'll 
get a response with the desired content type.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>to your <code>WEB-INF/web.xml</code>.</p><p>A default content 
type can also be overridden using request headers. Specifying 
<code>xml=true</code> or <code>json=true</code> URL parameter you'll get a 
response with the desired content type.</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[wget --user admin --password admin 
http://localhost:8161/api/message/TEST?type=queue\&amp;clientId=A\&amp;json=true]]></script>
-</div></div>
-
-<h3 id="REST-Security">Security</h3>
-
-<p>Since 5.7.0 release REST API can connect to the secured brokers. The API 
uses basic authentication header format to get username and password 
information.</p>
-
-<p>For example, with curl you can do something like</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h3 id="REST-Security">Security</h3><p>Since 5.7.0 release REST 
API can connect to the secured brokers. The API uses basic authentication 
header format to get username and password information.</p><p>For example, with 
curl you can do something like</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[curl -u system:manager -d 
&quot;body=message&quot; 
http://localhost:8161/demo/message/TEST?type=queue]]></script>
-</div></div>
-
-<p>Also, you might want to enable <code>ssl</code> for your connections. To do 
that, just uncomment SecureConnector in <code>conf/jetty.xml</code></p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>Also, you might want to enable <code>ssl</code> for your 
connections. To do that, just uncomment SecureConnector in 
<code>conf/jetty.xml</code></p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[                &lt;bean 
id=&quot;SecureConnector&quot; 
class=&quot;org.eclipse.jetty.server.ssl.SslSelectChannelConnector&quot;&gt;
                     &lt;property name=&quot;port&quot; value=&quot;8162&quot; 
/&gt;
                     &lt;property name=&quot;keystore&quot; 
value=&quot;file:${activemq.conf}/broker.ks&quot; /&gt;
                     &lt;property name=&quot;password&quot; 
value=&quot;password&quot; /&gt;
                 &lt;/bean&gt;]]></script>
-</div></div>
-
-<h2 id="REST-RestManagement">Rest Management</h2>
-
-<p>Starting with version 5.8 we provide a REST management API for the broker. 
Using <a shape="rect" class="external-link" href="http://www.jolokia.org/"; 
rel="nofollow">Jolokia</a> JMX-HTTP bridge it's possible to access all broker 
metrics (like memory usage) and execute management operations (like purging 
queues) using REST API. By default the management API is exposed at <a 
shape="rect" class="external-link" href="http://localhost:8161/api/jolokia/"; 
rel="nofollow">http://localhost:8161/api/jolokia/</a> URL. So you can for 
example get basic broker data with </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><h2 id="REST-RestManagement">Rest Management</h2><p>Starting with 
version 5.8 we provide a REST management API for the broker. Using <a 
shape="rect" class="external-link" href="http://www.jolokia.org/"; 
rel="nofollow">Jolokia</a> JMX-HTTP bridge it's possible to access all broker 
metrics (like memory usage) and execute management operations (like purging 
queues) using REST API. By default the management API is exposed at <a 
shape="rect" class="external-link" href="http://localhost:8161/api/jolokia/"; 
rel="nofollow">http://localhost:8161/api/jolokia/</a> URL. So you can for 
example get basic broker data with</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[wget --user admin --password admin 
--auth-no-challenge 
http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost]]></script>
-</div></div>
-
-<p>or to be more specific, total consumer count with</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>or to be more specific, total consumer count with</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[wget --user admin --password admin 
--auth-no-challenge 
http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost/TotalConsumerCount]]></script>
-</div></div>
-
-<p>For more information on Jolokia protocol, see its reference manual. An API 
like this makes it easy to script monitoring and management operations agains 
the broker.</p></div>
+</div></div><p>For more information on Jolokia protocol, see its reference 
manual. An API like this makes it easy to script monitoring and management 
operations against the broker, see also&#160;<a shape="rect" 
href="how-can-i-monitor-activemq.html">How can I monitor ActiveMQ</a>?</p></div>
         </td>
         <td valign="top">
           <div class="navigation">


Reply via email to