You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by bu...@apache.org on 2013/07/05 13:21:26 UTC

svn commit: r868452 - in /websites/production/activemq/content: cache/main.pageCache websockets.html

Author: buildbot
Date: Fri Jul  5 11:21:26 2013
New Revision: 868452

Log:
Production update by buildbot for activemq

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

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

Modified: websites/production/activemq/content/websockets.html
==============================================================================
--- websites/production/activemq/content/websockets.html (original)
+++ websites/production/activemq/content/websockets.html Fri Jul  5 11:21:26 2013
@@ -50,8 +50,8 @@
       <div>
 
 <!-- Banner -->
-
-	<div id="asf_logo">
+<p>
+	</p><div id="asf_logo">
 	<div id="activemq_logo">
             <a shape="rect" style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;" href="http://activemq.apache.org" title="The most popular and powerful open source Message Broker">ActiveMQ</a> &#8482;
             <a shape="rect" style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;" href="http://www.apache.org" title="The Apache Software Foundation">ASF</a>
@@ -75,9 +75,9 @@
 <h1><a shape="rect" name="WebSockets-Introduction"></a>Introduction</h1>
 <p>Besides <a shape="rect" href="ajax.html" title="Ajax">Ajax</a> API, starting with version <b>5.4.0</b> onwards, you can use HTML5 <a shape="rect" class="external-link" href="http://dev.w3.org/html5/websockets/" rel="nofollow">WebSockets</a> to exchange messages with the broker from your browser. </p>
 
-<p>HTML 5 introduced web sockets, as a standardized way to communicate asynchronously with the server from a web page. This is practically an ideal channel for implementing asynchronous messaging for web pages. Also, since JavaScript easily handles text and JSON formatted data, <a shape="rect" class="external-link" href="http://activemq.apache.org/stomp/">Stomp</a> protocol is a natural choice for the wire protocol to be used over web sockets.</p>
+<p>HTML 5 introduced web sockets, as a standardized way to communicate asynchronously with the server from a web page. This is practically an ideal channel for implementing asynchronous messaging for web pages. Since JavaScript easily handles text and JSON formatted data, <a shape="rect" class="external-link" href="http://activemq.apache.org/stomp/">Stomp</a> protocol is a good choice for the wire protocol to be used over web sockets. Since version <b>5.9.0</b>, we also support efficient binary MQTT protocol over Web sockets.</p>
 
-<p>This solution should bring better messaging capabilities to JavaScript clients then simple Ajax API, as implementing Stomp in JavaScript brings much more messaging-oriented API and features such as transactions, for example.</p>
+<p>This solution should bring better messaging capabilities to JavaScript clients then simple Ajax API, as implementing Stomp or MQTT in JavaScript brings much more messaging-oriented API and features such as transactions, for example.</p>
 
 <h1><a shape="rect" name="WebSockets-Configuration"></a>Configuration</h1>
 
@@ -86,9 +86,9 @@
 <p>To configure it, you need to place something like this to your ActiveMQ configuration file</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">&lt;transportConnectors&gt;
-  &lt;transportConnector name=<span class="code-quote">"websocket"</span> uri=<span class="code-quote">"ws:<span class="code-comment">//0.0.0.0:61614"</span>/&gt;
-</span>&lt;/transportConnectors&gt;</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;transportConnectors&gt;
+  &lt;transportConnector name="websocket" uri="ws://0.0.0.0:61614"/&gt;
+&lt;/transportConnectors&gt;]]></script>
 </div></div>
 
 <p>One thing worth noting is that web sockets (just as Ajax) implements the <em>same origin policy</em>, so you can access only brokers running on the same host as the web application running the client.</p>
@@ -98,31 +98,37 @@
 <p>Version 5.7.0 introduced <em>Secure Web Socket</em> transport. To configure it you need two things. First, you need to configure a new transport connector like this</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">&lt;transportConnectors&gt;
-  &lt;transportConnector name=<span class="code-quote">"secure_websocket"</span> uri=<span class="code-quote">"wss:<span class="code-comment">//0.0.0.0:61614"</span>/&gt;
-</span>&lt;/transportConnectors&gt;</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;transportConnectors&gt;
+  &lt;transportConnector name="secure_websocket" uri="wss://0.0.0.0:61614"/&gt;
+&lt;/transportConnectors&gt;]]></script>
 </div></div>
 
 <p>Note that we use <em>wss</em> url prefix to denote a secured version of the protocol. Next you need to provide SSL context for this transport. You can do that by providing <em>sslContext</em> in your broker configuration in a similar fashion as you'd do for <em>ssl</em> or <em>https</em> transports.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">&lt;sslContext&gt;
-    &lt;sslContext keyStore=<span class="code-quote">"file:${activemq.conf}/broker.ks"</span>
-                keyStorePassword=<span class="code-quote">"password"</span> trustStore=<span class="code-quote">"file:${activemq.conf}/broker.ts"</span>
-                trustStorePassword=<span class="code-quote">"password"</span>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;sslContext&gt;
+    &lt;sslContext keyStore="file:${activemq.conf}/broker.ks"
+                keyStorePassword="password" trustStore="file:${activemq.conf}/broker.ts"
+                trustStorePassword="password"
     /&gt;
-&lt;/sslContext&gt;</pre>
+&lt;/sslContext&gt;]]></script>
 </div></div>
 
 <p>That's it, your secure websocket transport is ready. Take a look at the next section to see how to use a demo to test it out.</p>
 
-<h1><a shape="rect" name="WebSockets-Demo"></a>Demo</h1>
+<h1><a shape="rect" name="WebSockets-Demos"></a>Demos</h1>
+
+<p>As of version 5.6.0, an adapted demo of <a shape="rect" class="external-link" href="http://github.com/jmesnil/stomp-websocket" rel="nofollow">stomp-websocket</a> library is integrated with ActiveMQ web demo application. <br clear="none">
+As of version 5.9.0, we have a similar demo using MQTT and <a shape="rect" class="external-link" href="http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git" rel="nofollow">Eclipse Paho client</a></p>
+
+<p>To see demos:</p>
+
+<ul><li>Start the broker with <tt>ws</tt> transport (you can use activemq-demo.xml configuration for that)</li><li>Go to <a shape="rect" class="external-link" href="http://localhost:8161/demo/websocket" rel="nofollow">http://localhost:8161/demo/websocket</a> to check Stomp example</li><li>Go to <a shape="rect" class="external-link" href="http://localhost:8161/demo/websocket" rel="nofollow">http://localhost:8161/demo/websocket</a> to check MQTT example</li></ul>
 
-<p>As of version 5.6.0, an adapted demo of <a shape="rect" class="external-link" href="http://github.com/jmesnil/stomp-websocket" rel="nofollow">stomp-websocket</a> library is integrated with ActiveMQ web demo application. Enable <tt>ws</tt> transport, start the broker and go to <a shape="rect" class="external-link" href="http://localhost:8161/demo/websocket" rel="nofollow">http://localhost:8161/demo/websocket</a> to see it in action.</p>
 
 <h1><a shape="rect" name="WebSockets-Clients"></a>Clients</h1>
 
-<ul><li><a shape="rect" class="external-link" href="http://github.com/krukow/stomple" rel="nofollow">Stomple</a> by <a shape="rect" class="external-link" href="http://blog.higher-order.net/" rel="nofollow">Karl Krukow</a></li><li><a shape="rect" class="external-link" href="http://github.com/jmesnil/stomp-websocket" rel="nofollow">stomp-websocket</a> by <a shape="rect" class="external-link" href="http://jmesnil.net/weblog/" rel="nofollow">Jeff Mesnil</a></li></ul>
+<ul><li><a shape="rect" class="external-link" href="http://github.com/krukow/stomple" rel="nofollow">Stomple</a> by <a shape="rect" class="external-link" href="http://blog.higher-order.net/" rel="nofollow">Karl Krukow</a></li><li><a shape="rect" class="external-link" href="http://github.com/jmesnil/stomp-websocket" rel="nofollow">stomp-websocket</a> by <a shape="rect" class="external-link" href="http://jmesnil.net/weblog/" rel="nofollow">Jeff Mesnil</a></li><li><a shape="rect" class="external-link" href="http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git" rel="nofollow">Eclipse Paho MQTT JavaScript client</a></li></ul>
 
 
 <h1><a shape="rect" name="WebSockets-MoreResources"></a>More Resources</h1>
@@ -133,7 +139,6 @@
 
 
 
-
           </div>
         </td>
         <td valign="top">
@@ -147,8 +152,8 @@
 
 <h3><a shape="rect" name="Navigation-Search"></a>Search</h3>
 
-
-<div>
+<p>
+</p><div>
 <form enctype="application/x-www-form-urlencoded" method="get" action="http://www.google.com/search" style="font-size: 10px;">
 <input type="hidden" name="ie" value="UTF-8">
 <input type="hidden" name="oe" value="UTF-8">