blob: 0abab6eb73ee0583ce8562216aa35d2484223dec [file] [log] [blame]
<div class="docbook"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.5. Virtualhosts</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Java-Broker-Concepts-RemoteReplicationNodes.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Concepts</th><td width="20%" align="right"> <a accesskey="n" href="Java-Broker-Concepts-Exchanges.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Java-Broker-Concepts-Virtualhosts"></a>4.5. Virtualhosts</h2></div></div></div><p>A virtualhost is a container in which messaging is performed. Virtualhosts are independent;
the messaging that goes on within one virtualhost is independent of any messaging that goes on
in another virtualhost. For instance, a queue named <span class="emphasis"><em>foo</em></span> defined in one
virtualhost is completely independent of a queue named <span class="emphasis"><em>foo</em></span> in another
virtualhost.</p><p>A virtualhost is identified by a name which must be unique broker-wide. Clients use the name
to identify the virtualhost to which they wish to connect when they connect.</p><p>A virtualhost exists in a virtualhost node.</p><p>The virtualhost comprises a number of entities. This section summaries the purpose of
each of the entities and describes the relationships between them. These details are developed
further in the sub-sections that follow.</p><p><span class="emphasis"><em>Exchanges</em></span> is a named entity within the Virtual Host which receives
messages from producers and routes them to matching Queues. When using AMQP 0-8, 0-9, 0-9-1, 0-10
the exchange is the only way ingressing a message into the virtualhost. When using AMQP 1.0
producers may route messages via exchanges or direct to queues.</p><p><span class="emphasis"><em>Queues</em></span> are named entities that hold messages for delivery to consumer
applications.</p><p><span class="emphasis"><em>Connections</em></span> represent a live connection to the virtualhost from a
messaging client.</p><p>A <span class="emphasis"><em>Session</em></span> represents a context for the production or consumption of
messages. A Connection can have many Sessions.</p><p>A <span class="emphasis"><em>Consumer</em></span> represents a live consumer that is attached to queue.</p><p><span class="emphasis"><em>Loggers</em></span> are responsible for producing logs for this virtualhost.</p><p> The following diagram depicts the Virtualhost model: </p><div class="figure"><a id="d0e523"></a><p class="title"><strong>Figure 4.3. Virtualhost Model showing major entities</strong></p><div class="figure-contents"><div class="mediaobject"><table border="0" summary="manufactured viewport for HTML img" style="cellpadding: 0; cellspacing: 0;" width="100%"><tr><td><img src="images/VirtualHost-Model.png" height="360" alt="Virtual Host Model" /></td></tr></table></div></div></div><p><br class="figure-break" />
</p><p>A <span class="emphasis"><em>virtualhost</em></span> is backed by storage which is used to store the
messages.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Java-Broker-Concepts-RemoteReplicationNodes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-Broker-Concepts.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Concepts-Exchanges.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.4. Remote Replication Nodes </td><td width="20%" align="center"><a accesskey="h" href="Apache-Qpid-Broker-J-Book.html">Home</a></td><td width="40%" align="right" valign="top"> 4.6. Exchanges</td></tr></table></div></div>