-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpart1.html
21 lines (14 loc) · 1.91 KB
/
part1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<div xmlns="http://www.w3.org/1999/xhtml" data-type="part" id="part_stomp">
<h1>STOMP</h1>
<div class="partintro">
<p>For the next four chapters, we will use the STOMP protocol to build our applications (this book covers the latest version of the protocol, <a href="http://bit.ly/STOMPspec">STOMP 1.2</a>). STOMP is a simple text-based messaging protocol that is well suited to develop lightweight messaging applications on any platform. It provides an interoperable wire format so that any client can communicate with any message broker. The simplicity of the protocol ensures that it is straightforward to have interoperability between client and brokers. It does not define the semantics of the destination; they depend on the STOMP broker you are using.</p>
<p>There are some conventions shared by STOMP brokers (e.g., prefixing a destination by <code>/queue/</code> to use a queue and by <code>/topic/</code> to use a topic), but you need to consult your broker documentation to check which messaging models are supported (including <em>point-to-point</em> and <em>publish/subscribe</em>) and how to use them.</p>
<p>STOMP is based on text and a few parsing rules, which makes it simple to use from any platform able to read and write text and open a network connection.
However, being text-based means that the protocol is not the most efficient to use, as it requires more network bandwidth and memory than corresponding binary-based protocols.
If your applications can work with these constraints, STOMP is a good messaging protocol to use.</p>
<div data-type="note">
<p>Before using a STOMP client, a broker must be installed and
configured to be able to exchange messages. In this book, we use Apache ActiveMQ, and <a data-type="xref" href="#appendix_activemq">#appendix_activemq</a> shows how to install and configure it. When ActiveMQ is started, it will accept STOMP connections on the <code>61613</code> port.</p>
</div>
</div>
</div>