# Virtualhosts

A virtualhost is a namespace in which messaging is performed. Virtualhosts are independent; the messaging goes on a within a virtualhost is independent of any messaging that goes on in another virtualhost. For instance, a queue named foo defined in one virtualhost is completely independent of a queue named foo in another virtualhost.

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.

A virtualhost exists in a container called a virtualhost node.

The virtualhost comprises of 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.

Exchanges is a named entity within the Virtual Host which receives messages from producers and routes them to matching Queues.

Queues are named entities that hold messages for delivery to consumer applications.

Bindings are relationships between Exchanges and Queue that facilitate routing of messages from the Exchange to the Queue.

Connections represent a live connection to the virtualhost from a messaging client.

A Session represents a context for the production or consumption of messages. Connection support many Sessions.

A Consumer represents a live consumer that is attached to queue.

The following diagram depicts the Virtualhost model:

Virtualhost Model

Virtual Host Model

A virtualhost is backed by storage which is used to store the messages.