With virtual hosts (vhosts), it is possible to have many different, independent virtual brokers within one single RabbitMQ instance. In this way, it is possible to use the same broker on the parts of many different applications without worrying about name clashes. This is the same approach used by web servers with virtual hosts.
You can find the simple Java example in the
Chapter03/Recipe01 directory, which is identical to the example in the first recipe of the book, except for the usage of the vhost.
To exercise this recipe, you just need to issue some commands at the Linux command prompt, that is, RabbitMQ Command Prompt (sbindir) in the Windows Start menu.
To create a new vhost, perform the following steps: ...