activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r996362 - in /websites/production/activemq/content: cache/main.pageCache stomp.html
Date Wed, 31 Aug 2016 18:22:20 GMT
Author: buildbot
Date: Wed Aug 31 18:22:20 2016
New Revision: 996362

Log:
Production update by buildbot for activemq

Modified:
    websites/production/activemq/content/cache/main.pageCache
    websites/production/activemq/content/stomp.html

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

Modified: websites/production/activemq/content/stomp.html
==============================================================================
--- websites/production/activemq/content/stomp.html (original)
+++ websites/production/activemq/content/stomp.html Wed Aug 31 18:22:20 2016
@@ -90,20 +90,20 @@
 </div></div><p>To see a full example, try <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/example/conf/activemq.xml">this XML</a>. If you save that XML as&#160;<strong><code>foo.xml</code></strong> then you can run stomp via the command line as</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">activemq xbean:foo.xml
 </pre>
-</div></div><p>For more help see <a shape="rect" href="run-broker.html">Run Broker</a>.</p><h3 id="Stomp-TheStompWireFormat">The Stomp Wire Format</h3><p>Stomp uses a text based wire format that can be configured with the following options. &#160;All options can be configured on a Brokers transport bind URI.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Parameter Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxDataLength</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>104857600</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximum size of the message body (content) that can be sent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxFrameSize</code></p></td><t
 d colspan="1" rowspan="1" class="confluenceTd"><p><code>MAX_LONG</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>(v5.12.0) Maximum frame size that can be sent. A Stomp frame includes a command, optional headers, and an optional body. Can help help prevent OOM DOS attacks</p></td></tr></tbody></table></div><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>For more help see <a shape="rect" href="run-broker.html">Run Broker</a>.</p><h3 id="Stomp-TheStompWireFormat">The Stomp Wire Format</h3><p>Stomp uses a text based wire format that can be configured with the following options. &#160;All options can be configured on a Brokers transport bind URI.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Parameter Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxDataLength</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>104857600</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Maximum size of the message body (content) that can be sent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxFrameSize</code></p></td><t
 d colspan="1" rowspan="1" class="confluenceTd"><p><code>MAX_LONG</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>From ActiveMQ 5.12.0</strong>: maximum frame size that can be sent. A Stomp frame includes a command, optional headers, and an optional body. Can help help prevent OOM DOS attacks</p></td></tr></tbody></table></div><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;transportConnector name="stomp+ssl" uri="stomp+ssl://localhost:61612?wireFormat.maxFrameSize=1000000"/&gt;</pre>
-</div></div><div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Use the Correct Prefix!</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Wire format options must have the prefix&#160;<strong><code>wireFormat.</code></strong> to take effect, e.g.,&#160;<strong><code>wireFormat.<code>maxDataLength</code>=100000</code></strong>. Options missing this prefix will be ignored.</p></div></div><h3 id="Stomp-Security">Security</h3><p>Stomp implementation fully supports an <a shape="rect" href="security.html">ActiveMQ security</a> mechanism. This means that the <strong><code>CONNECT</code></strong> command will return an <strong><code>ERROR</code></strong> STOMP frame on unsuccessful authentication. Also, the authorization policies will be applied when you try to access (read/write) certain destinations. If you use synchronous operations (by using <a
  shape="rect" class="external-link" href="http://stomp.github.com/stomp-specification-1.1.html#RECEIPT" rel="nofollow">receipts</a>), you can expect an <strong><code>ERROR</code></strong> frame in case of unauthorized access attempt. In other case, operations will be discarded but the client will not be informed of errors. This applies to all errors that can occur broker-side.</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Availability</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Stomp security implementation is available from version 5.1 on.</p></div></div><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">SSL</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>For additional security
 , you can use Stomp over SSL as described in the following section.</p></div></div><h3 id="Stomp-EnablingStompoverNIO">Enabling Stomp over NIO</h3><p>For better scalability (and performance) you might want to run Stomp protocol over NIO transport. To do that just use <strong><code>stomp+nio</code></strong> transport prefix instead of <strong><code>stomp</code></strong>. For example, add the following transport configuration in your XML file</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><div class="confluence-information-macro confluence-information-macro-warning"><p class="title">Use the Correct Prefix!</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Wire format options must have the prefix&#160;<strong><code>wireFormat.</code></strong> to take effect, e.g.,&#160;<strong><code>wireFormat.<code>maxDataLength</code>=100000</code></strong>. Options missing this prefix will be ignored.</p></div></div><h3 id="Stomp-Security">Security</h3><p><strong>From ActiveMQ 5.1</strong>: Stomp fully supports <a shape="rect" href="security.html">ActiveMQ's security</a> mechanism. This means that the <strong><code>CONNECT</code></strong> command will return an <strong><code>ERROR</code></strong> STOMP frame on unsuccessful authentication. Also, the authorization policies will be applied when you try to access (read/write) certain destinations. If you use synchronous ope
 rations (by using <a shape="rect" class="external-link" href="http://stomp.github.com/stomp-specification-1.1.html#RECEIPT" rel="nofollow">receipts</a>), you can expect an <strong><code>ERROR</code></strong> frame in case of unauthorized access attempt. In other case, operations will be discarded but the client will not be informed of errors. This applies to all errors that can occur broker-side.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">SSL</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>For additional security, you can use Stomp over SSL as described in the following section.</p></div></div><h3 id="Stomp-EnablingStompoverNIO">Enabling Stomp over NIO</h3><p>For better scalability (and performance) you might want to run Stomp protocol over NIO transport. To do that just use <strong><code>stomp+nio</code></strong> transport pref
 ix instead of <strong><code>stomp</code></strong>. For example, add the following transport configuration in your XML file</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;transportConnector name="stomp+nio" uri="stomp+nio://localhost:61612"/&gt;
 </pre>
 </div></div><p>This transport use <a shape="rect" class="external-link" href="http://activemq.apache.org/configuring-transports.html#ConfiguringTransports-TheNIOTransport">NIO transport</a> underneath and will generally use much less threads than standard connector. This connector can help if you want to use <a shape="rect" class="external-link" href="http://activemq.apache.org/how-do-i-configure-10s-of-1000s-of-queues-in-a-single-broker-.html">large number of queues</a></p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Availability</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Stomp NIO connector implementation is available in version 5.3 and up.</p></div></div><h3 id="Stomp-EnablingStompoverSSL">Enabling Stomp over SSL</h3><p>It's easy to configure ActiveMQ to use Stomp over SSL connection. All you have to do is use <strong><c
 ode>stomp+ssl</code></strong> transport prefix instead of <strong><code>stomp</code></strong>. For example, add the following transport configuration in your XML file</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;transportConnector name="stomp+ssl" uri="stomp+ssl://localhost:61612"/&gt;
 </pre>
-</div></div><ul><li><p>For more details on using SSL with ActiveMQ see the following article (<a shape="rect" class="external-link" href="http://activemq.apache.org/how-do-i-use-ssl.html">How do I use SSL</a>).</p></li><li><p>Example of using Stomp over SSL on the client side could be found in the <a shape="rect" class="external-link" href="http://stomp.fusesource.org/documentation/php/book.html#SSL" rel="nofollow">PHP Stomp client example</a>.</p></li></ul><h3 id="Stomp-Heart-beatgraceperiods">Heart-beat grace periods</h3><p>The STOMP protocol (version 1.1 or greater) <a shape="rect" class="external-link" href="http://stomp.github.io/stomp-specification-1.2.html#Heart-beating" rel="nofollow">defines the concept of heart beats</a> as a method by which a client and broker can determine the health of the underlying TCP connection between them.</p><p>ActiveMQ offers support for STOMP defined heart beating provided the client is using version 1.1 (or greater) of the protocol. Prior to A
 ctiveMQ 5.9.0, however, the enforcement of the 'read' heart-beat timeout (that is, a heart-beat sent from the client to the broker) was strict. In other words, the broker was intolerant of late arriving read heart-beats from the client. This resulted in the broker concluding that the client was no longer present causing it to close its side of the client's connection when the client failed to honor it's configured heart-beat settings.</p><p>As of version 5.9.0 the timeout enforcement for read heart-beats is now configurable via a new transport option&#160;<strong><code>transport.hbGracePeriodMultiplier</code></strong>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><ul><li><p>For more details on using SSL with ActiveMQ see the following article (<a shape="rect" class="external-link" href="http://activemq.apache.org/how-do-i-use-ssl.html">How do I use SSL</a>).</p></li><li><p>Example of using Stomp over SSL on the client side could be found in the <a shape="rect" class="external-link" href="http://stomp.fusesource.org/documentation/php/book.html#SSL" rel="nofollow">PHP Stomp client example</a>.</p></li></ul><h3 id="Stomp-Heart-BeatGracePeriod">Heart-Beat Grace Period</h3><p>The STOMP protocol (version 1.1 or greater) <a shape="rect" class="external-link" href="http://stomp.github.io/stomp-specification-1.2.html#Heart-beating" rel="nofollow">defines the concept of heart beats</a> as a method by which a client and broker can determine the health of the underlying TCP connection between them.</p><p>ActiveMQ offers support for STOMP defined heart beating provided the client is using version 1.1 (or greater) of the protocol. Prior to Act
 iveMQ 5.9.0, however, the enforcement of the 'read' heart-beat timeout (that is, a heart-beat sent from the client to the broker) was strict. In other words, the broker was intolerant of late arriving read heart-beats from the client. This resulted in the broker concluding that the client was no longer present causing it to close its side of the client's connection when the client failed to honor it's configured heart-beat settings.</p><p>As of version 5.9.0 the timeout enforcement for read heart-beats is now configurable via a new transport option&#160;<strong><code>transport.hbGracePeriodMultiplier</code></strong>:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;transportConnectors&gt;
    &lt;transportConnector name="stomp" uri="stomp://localhost:61613?transport.hbGracePeriodMultiplier=1.5"/&gt;
 &lt;/transportConnectors&gt;
 </pre>
-</div></div><p>This multiplier is used to calculate the effective read heart-beat timeout the broker will enforce for each client's connection. The multiplier is applied to the read-timeout interval the client specifies in its&#160;<strong><code>CONNECT</code></strong> frame:</p><p><code>&#160; <strong>&lt;client specified read heart-beat interval&gt; * &lt;grace periodmultiplier&gt; == &lt;broker enforced read heart-beat timeout interval&gt;</strong></code></p><p>For backward compatibility, if the grace period multiplier is not configured the default enforcement mode remains strict, e.g.,&#160;<strong><code>transport.hbGracePeriodMultiplier=1.0</code></strong>. Attempts to configure the grace period multiplier to a value less than, or equal to 1.0 will be silently ignored.</p><p>STOMP clients that wish to be tolerant of late arriving heart-beats from the broker must implement their own solution for doing so.</p><ul><li><p>Please check the <a shape="rect" class="external-link" href=
 "http://stomp.github.io/stomp-specification-1.2.html#Heart-beating" rel="nofollow">STOMP specification</a> for the details on heart-beating</p></li><li><p>The JIRA that implemented this: <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/AMQ-4674">ActiveMQ 5.x does not support the notion of a grace-period for heart beats as supported by the STOMP protocol</a></p></li></ul><h3 id="Stomp-WorkingwithDestinationswithStomp">Working with Destinations with Stomp</h3><p>Note that the prefix in stomp <strong><code>/queue/</code></strong> or&#160;<strong><code>/topic/</code></strong> is removed from the string before passing it to ActiveMQ as a JMS destination. Also note that the default separator in MOM systems is&#160;<strong><code>.</code></strong> (dot). Whilst <strong><code>FOO.BAR</code></strong> is the normal syntax to identify a queue type destination the Stomp equivalent is <strong><code>/queue/FOO.BAR</code></strong></p><div class="confluence-informati
 on-macro confluence-information-macro-warning"><p class="title">Be careful about starting destinations with /</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If in Stomp world you use&#160;<strong><code>/queue/foo/bar</code></strong> then in a JMS world the queue would be called <strong><code>foo/bar</code></strong> not&#160;<strong><code>/foo/bar</code></strong>.</p></div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Persistent Messaging in STOMP</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">STOMP messages are non-persistent by default. To use persistent messaging add the following STOMP header to all&#160;<strong><code>SEND</code></strong> requests: <strong><code>persistent:true</code></strong>. This default is the opposi
 te of that for JMS messages.</div></div><h3 id="Stomp-WorkingwithJMSText/BytesMessagesandStomp">Working with JMS Text/Bytes Messages and Stomp</h3><p>Stomp is a very simple protocol - that's part of the beauty of it! As such, it does not have knowledge of JMS messages such as&#160;<strong><code>TextMessage</code></strong>'s or <strong><code>BytesMessage</code></strong>'s. The protocol does however support a&#160;<strong><code>content-length</code></strong> header. To provide more robust interaction between STOMP and JMS clients, ActiveMQ keys off of the inclusion of this header to determine what message type to create when sending from Stomp to JMS. The logic is simple:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Inclusion of content-length header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Resulting Message</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>yes</p></td><td
  colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>BytesMessage</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>TextMessage</code></strong></p></td></tr></tbody></table></div><p>This same logic can be followed when going from JMS to Stomp, as well. A Stomp client could be written to key off of the inclusion of the content-length header to determine what type of message structure to provide to the user.</p><h3 id="Stomp-Messagetransformations">Message transformations</h3><p>The <strong><code>transformation</code></strong> message header on <strong><code>SEND</code></strong> and <strong><code>SUBSCRIBE</code></strong> messages could be used to instruct ActiveMQ to transform messages from text to the format of your desire. Currently, ActiveMQ comes with a transformer that can transform XML/JSON text to Java objects, but you can add your own transformers as well.
 </p><p>Here's a quick example of how to use built-in transformer (taken from test cases)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>This multiplier is used to calculate the effective read heart-beat timeout the broker will enforce for each client's connection. The multiplier is applied to the read-timeout interval the client specifies in its&#160;<strong><code>CONNECT</code></strong> frame:</p><p><code>&#160; <strong>&lt;client specified read heart-beat interval&gt; * &lt;grace periodmultiplier&gt; == &lt;broker enforced read heart-beat timeout interval&gt;</strong></code></p><p>For backward compatibility, if the grace period multiplier is not configured the default enforcement mode remains strict, e.g.,&#160;<strong><code>transport.hbGracePeriodMultiplier=1.0</code></strong>. Attempts to configure the grace period multiplier to a value less than, or equal to 1.0 will be silently ignored.</p><p>STOMP clients that wish to be tolerant of late arriving heart-beats from the broker must implement their own solution for doing so.</p><ul><li><p>Please check the <a shape="rect" class="external-link" href=
 "http://stomp.github.io/stomp-specification-1.2.html#Heart-beating" rel="nofollow">STOMP specification</a> for the details on heart-beating</p></li><li><p>The JIRA that implemented this: <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/AMQ-4674">ActiveMQ 5.x does not support the notion of a grace-period for heart beats as supported by the STOMP protocol</a></p></li></ul><h3 id="Stomp-WorkingwithDestinationswithStomp">Working with Destinations with Stomp</h3><p>Note that the prefix in stomp <strong><code>/queue/</code></strong> or&#160;<strong><code>/topic/</code></strong> is removed from the string before passing it to ActiveMQ as a JMS destination. Also note that the default separator in MOM systems is&#160;<strong><code>.</code></strong> (dot). Whilst <strong><code>FOO.BAR</code></strong> is the normal syntax to identify a queue type destination the Stomp equivalent is <strong><code>/queue/FOO.BAR</code></strong></p><div class="confluence-informati
 on-macro confluence-information-macro-warning"><p class="title">Be careful about starting destinations with /</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If in Stomp world you use&#160;<strong><code>/queue/foo/bar</code></strong> then in a JMS world the queue would be called <strong><code>foo/bar</code></strong> not&#160;<strong><code>/foo/bar</code></strong>.</p></div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Persistent Messaging in STOMP</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>STOMP messages are non-persistent by default. To use persistent messaging add the following STOMP header to all&#160;<strong><code>SEND</code></strong> requests: <strong><code>persistent:true</code></strong>. This default is the opp
 osite of that for JMS messages.</p></div></div><h3 id="Stomp-WorkingwithJMSText/BytesMessagesandStomp">Working with JMS Text/Bytes Messages and Stomp</h3><p>Stomp is a very simple protocol - that's part of the beauty of it! As such, it does not have knowledge of JMS messages such as&#160;<strong><code>TextMessage</code></strong>'s or <strong><code>BytesMessage</code></strong>'s. The protocol does however support a&#160;<strong><code>content-length</code></strong> header. To provide more robust interaction between STOMP and JMS clients, ActiveMQ keys off of the inclusion of this header to determine what message type to create when sending from Stomp to JMS. The logic is simple:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Inclusion of content-length header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Resulting Message</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>yes</p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>BytesMessage</code></strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>no</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>TextMessage</code></strong></p></td></tr></tbody></table></div><p>This same logic can be followed when going from JMS to Stomp, as well. A Stomp client could be written to key off of the inclusion of the&#160;<strong><code>content-length</code></strong> header to determine what type of message structure to provide to the user.</p><h3 id="Stomp-MessageTransformations">Message Transformations</h3><p>The <strong><code>transformation</code></strong> message header on <strong><code>SEND</code></strong> and <strong><code>SUBSCRIBE</code></strong> messages could be used to instruct ActiveMQ to transform messages from text to the format of your desire. Currently, ActiveMQ comes with a transformer that can transform XML/JSON text to Java objects, but 
 you can add your own transformers as well.</p><p>Here's a quick example of how to use built-in transformer (taken from test cases)</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">    private String xmlObject = "&lt;pojo&gt;\n" 
             + "  &lt;name&gt;Dejan&lt;/name&gt;\n"
             + "  &lt;city&gt;Belgrade&lt;/city&gt;\n" 
@@ -193,7 +193,7 @@ connection.disconnect();
 </div></div><p>This example is distributed with the ActiveMQ distribution. You can run it from the <code>example</code> folder with</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">ant stomp
 </pre>
-</div></div><h3 id="Stomp-StompExtensionsforJMSMessageSemantics">Stomp Extensions for JMS Message Semantics</h3><p>Note that STOMP is designed to be as simple as possible - so any scripting language / platform can message any other with minimal effort. STOMP allows pluggable headers on each request such as sending &amp; receiving messages. ActiveMQ has several extensions to the Stomp protocol, so that JMS semantics can be supported by Stomp clients. An OpenWire JMS producer can send messages to a Stomp consumer, and a Stomp producer can send messages to an OpenWire JMS consumer. And Stomp to Stomp configurations, can use the richer JMS message control.</p><p>STOMP supports the following standard JMS properties on&#160;<strong><code>SENT</code></strong> messages:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>STOMP Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JMS Header</p></th><th colspan
 ="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>correlation-id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSCorrelationID</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Good consumers will add this header to any responses they send.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>expires</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSExpiration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Expiration time of the message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>persistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSDeliveryMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the message is persistent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prior
 ity</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSPriority</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Priority on the message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>reply-to</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSReplyTo</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Destination you should send replies to.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type of the message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupID</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupID</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the <a shape="rect" href="message-groups.ht
 ml">Message Groups.</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupSeq</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupSeq</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Optional header that specifies the sequence number in the <a shape="rect" href="message-groups.html">Message Groups.</a></p></td></tr></tbody></table></div><h3 id="Stomp-ActiveMQExtensionstoSTOMP">ActiveMQ Extensions to STOMP</h3><p>You can add custom headers to STOMP commands to configure the ActiveMQ protocol. Here are some examples:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Verb</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd
 "><p><code>CONNECT</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>client-id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>string</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the JMS clientID which is used in combination with the&#160;<strong><code>activemq.subcriptionName</code></strong> to denote a durable subscriber.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>selector</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>string</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies a JMS Selector using SQL 92 syntax as specified in the JMS 1.1 specification. This allows a filter to be applied to each message as part of the subscription.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colsp
 an="1" rowspan="1" class="confluenceTd"><p><code>activemq.dispatchAsync</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should messages be dispatched synchronously or asynchronously from the producer thread for non-durable topics in the broker?</p><p>For fast consumers set this to <strong><code>false</code></strong>.</p><p>For slow consumers set it to&#160;<strong><code>true</code></strong> so that dispatching will not block fast consumers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.exclusive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>I would like to be an <a shape="rect" href="exclusive-consumer.html">Exclusive Consumer</a> on the queue.</p></td></tr><tr><td 
 colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.maximumPendingMessageLimit</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For <a shape="rect" href="slow-consumer-handling.html">Slow Consumer Handling</a> on non-durable topics by dropping old messages - we can set a maximum-pending limit, such that once a slow consumer backs up to this high water mark we begin to discard old messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.noLocal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies whether or not locally sent messages should be ignored for subscriptions.</p><p>Se
 t to <strong><code>true</code></strong> to filter out locally sent messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.prefetchSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the maximum number of pending messages that will be dispatched to the client. Once this maximum is reached no more messages are dispatched until the client acknowledges a message.</p><p>Set to a low value &gt; <strong>1</strong> for fair distribution of messages across consumers when processing messages can be slow</p><p><strong>Note</strong>: if your STOMP client is implemented using a dynamic scripting language like Ruby, say, then this parameter <strong><em>must</em></strong> be set to&#160;<strong><code>1</code></strong> as there is no notion of a client-side message size to 
 be sized.</p><p>STOMP does not support a value of <strong><code>0</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.priority</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>byte</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets the priority of the consumer so that dispatching can be weighted in priority order.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.retroactive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For non-durable topics make this subscription <a shape="rect" href="retroactive-consumer.html">retroactive</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"
 ><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.subscriptionName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>string</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For durable topic subscriptions you must specify the same&#160;<strong><code>activemq.client-id</code></strong> on the connection and <strong><code>activemq.subcriptionName</code></strong> on the subscribe prior to v5.7.0.</p><p><strong>Note</strong>: the spelling <strong><code>subcriptionName</code></strong> NOT <strong><code>subscriptionName</code></strong>. This is not intuitive, but it is how it is implemented in ActiveMQ 4.x.</p><p>For the 5.0 release of ActiveMQ, both&#160;<strong><code>subcriptionName</code></strong> and&#160;<strong><code>subscriptionName</code></strong> will be supported (<strong><code>subcriptionName</code></strong> was removed as of v5.6.0).</p></td></tr><tr><td colspan="1" rowspan="1" class="c
 onfluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr></tbody></table></div></div>
+</div></div><h3 id="Stomp-StompExtensionsforJMSMessageSemantics">Stomp Extensions for JMS Message Semantics</h3><p>Note that STOMP is designed to be as simple as possible - so any scripting language / platform can message any other with minimal effort. STOMP allows pluggable headers on each request such as sending &amp; receiving messages. ActiveMQ has several extensions to the Stomp protocol, so that JMS semantics can be supported by Stomp clients. An OpenWire JMS producer can send messages to a Stomp consumer, and a Stomp producer can send messages to an OpenWire JMS consumer. And Stomp to Stomp configurations, can use the richer JMS message control.</p><p>STOMP supports the following standard JMS properties on&#160;<strong><code>SENT</code></strong> messages:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>STOMP Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>JMS Header</p></th><th colspan
 ="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>correlation-id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSCorrelationID</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Good consumers will add this header to any responses they send.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>expires</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSExpiration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Expiration time of the message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>persistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSDeliveryMode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not the message is persistent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>prior
 ity</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSPriority</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Priority on the message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>reply-to</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSReplyTo</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Destination you should send replies to.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSType</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type of the message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupID</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupID</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the <a shape="rect" href="message-groups.ht
 ml">Message Groups.</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupSeq</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JMSXGroupSeq</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Optional header that specifies the sequence number in the <a shape="rect" href="message-groups.html">Message Groups.</a></p></td></tr></tbody></table></div><h3 id="Stomp-ActiveMQExtensionstoSTOMP">ActiveMQ Extensions to STOMP</h3><p>You can add custom headers to STOMP commands to configure the ActiveMQ protocol. Here are some examples:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Verb</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd
 "><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.dispatchAsync</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Should messages be dispatched synchronously or asynchronously from the producer thread for non-durable topics in the broker?</p><p>For fast consumers set this to <strong><code>false</code></strong>.</p><p>For slow consumers set it to&#160;<strong><code>true</code></strong> so that dispatching will not block fast consumers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.exclusive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>I would like to be an <a shape="rect" href="exclusive-consumer.html">Exclusive Con
 sumer</a> on the queue.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.maximumPendingMessageLimit</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For <a shape="rect" href="slow-consumer-handling.html">Slow Consumer Handling</a> on non-durable topics by dropping old messages - we can set a maximum-pending limit, such that once a slow consumer backs up to this high water mark we begin to discard old messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.noLocal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies whether or not locally sent messages 
 should be ignored for subscriptions.</p><p>Set to <strong><code>true</code></strong> to filter out locally sent messages.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.prefetchSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>int</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the maximum number of pending messages that will be dispatched to the client. Once this maximum is reached no more messages are dispatched until the client acknowledges a message.</p><p>Set to a low value &gt; <strong>1</strong> for fair distribution of messages across consumers when processing messages can be slow</p><p><strong>Note</strong>: if your STOMP client is implemented using a dynamic scripting language like Ruby, say, then this parameter <strong><em>must</em></strong> be set to&#160;<strong><code>1</code></strong> as there i
 s no notion of a client-side message size to be sized.</p><p>STOMP does not support a value of <strong><code>0</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.priority</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>byte</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets the priority of the consumer so that dispatching can be weighted in priority order.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.retroactive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For non-durable topics make this subscription <a shape="rect" href="retroactive-consumer.html">retroactive</a>.</p></td></tr><tr><td
  colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq.subscriptionName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>string</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>For durable topic subscriptions you must specify the same&#160;<strong><code>activemq.client-id</code></strong> on the connection and <strong><code>activemq.subcriptionName</code></strong> on the subscribe prior to v5.7.0.</p><p><strong>Note</strong>: the spelling <strong><code>subcriptionName</code></strong> NOT <strong><code>subscriptionName</code></strong>. This is not intuitive, but it is how it is implemented in ActiveMQ 4.x.</p><p>For the 5.0 release of ActiveMQ, both&#160;<strong><code>subcriptionName</code></strong> and&#160;<strong><code>subscriptionName</code></strong> will be supported (<strong><code>subcriptionName</code></strong> was removed as of v5.6.0).</p></td>
 </tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CONNECT</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>client-id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>string</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the JMS clientID which is used in combination with the&#160;<strong><code>activemq.subcriptionName</code></strong> to denote a durable subscriber.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>SUBSCRIBE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>selector</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>string</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies a JMS Selector using SQL 92 syntax as specified in the JMS 1.1 specification. This allows a filter to be applied to each message as part of the subscription.</p></td></tr></tbody></table></div></div>
         </td>
         <td valign="top">
           <div class="navigation">




Mime
View raw message