HTML and CSS Reference
In-Depth Information
First, open the file ActiveMQ_HOME/conf/activemq.xml and search for the string
transportConnectors . Below the openwire transport connector, add the snippet shown
in Listing 5-3.
Listing 5-3. Declaring the WebSocket Connector
<transportConnector name="websocket" uri="ws://"/>
Now, the transport connector section of your activemq.xml file should look similar
to Listing 5-4 (newly added section highlighted).
Listing 5-4. activemq.xml Snippet with the WebSocket Connector
<!-- The transport connectors expose ActiveMQ over a given
protocol to clients and other brokers. For more
information, see: -->
<transportConnector name="openwire" uri="tcp://"/>
<transportConnector name="websocket" uri="ws://"/>
Save the activemq.xml file and start ActiveMQ again, as shown in Listing 5-2.
Confirm that the WebSocket connector has been started, by looking for the line shown in
Listing 5-5 in the console.
Listing 5-5. Log Message Indicating that the WebSocket Connector has been Started
INFO | Connector websocket Started
Now, you're ready to start the WebSocket example that ships as part of ActiveMQ. Navigate
to , and click the WebSocket example link, or simply enter the
direct URL in your browser's address bar: .
Figure 5-5 shows the page that displays at this URL.
Search WWH ::

Custom Search