HTML and CSS Reference
In-Depth Information
Figure 5-5.
The WebSocket Demo, which ships with Apache ActiveMQ
■
To troubleshoot the demo or learn more about configuring Websocket with
Note
Seeing STOMP Concepts in Action
ActiveMQ's WebSocket demo illustrates some of the basic STOMP concepts we discussed
earlier in this chapter and provides an easy way to see them in action before building the
application ourselves. Let's take a look at how these concepts surface in this demo.
To get started, you must first connect to the server. When we updated the
activemq.xml
Then, you need to provide user credentials: a user name and a password. We will use
guest
both as the user name (labeled as Login in the sample), and as the password.
Finally, you must provide a queue as a destination. By default it's called test. The
/queue
prefix indicates that this is a queue, and
/test
is the name of the queue. Feel free to
change the latter part of the string, for example:
/queue/stompDemo
.
■
For the demo to work, you just need to change the server URL. be sure to use
0.0.0.0
instead of
localhost
. All the other fields are pre-populated for you, and you don't
need to change them.
Note
After you click Connect, your application displays, as shown in Figure
5-6
.


