# Vhost support on mosquitto\_sub client

**URL:** <https://forum.cedalo.com/t/vhost-support-on-mosquitto-sub-client/623>\
**Category:** Mosquitto MQTT Broker\
**Created:** [October 7, 2022, 9:41am UTC](https://forum.cedalo.com/t/vhost-support-on-mosquitto-sub-client/623 "2022-10-07T09:41:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schrepfler](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.cedalo.com/schrepfler/32/466_2.png) [@schrepfler](https://forum.cedalo.com/u/schrepfler)\
**Post date:** [October 7, 2022, 9:41am UTC](https://forum.cedalo.com/t/vhost-support-on-mosquitto-sub-client/623/1 "2022-10-07T09:41:00Z")

</div>

When connecting via mostquitto\_sub to a RMQ which has virtual hosts, how does one specify that?

---

<div class="post-metadata">

**Author:** ![roger.light](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@roger.light](https://forum.cedalo.com/u/roger.light)\
**Post date:** [October 7, 2022, 3:54pm UTC](https://forum.cedalo.com/t/vhost-support-on-mosquitto-sub-client/623/2 "2022-10-07T15:54:06Z")

</div>

MQTT doesn’t have the concept of virtual hosts, so you need to handle it differently in RabbitMQ. The documentation discusses this: [MQTT Plugin — RabbitMQ](https://www.rabbitmq.com/mqtt.html#virtual-hosts)

The mosquitto clients do set an SNI host when using TLS, so you may be able to make use of that.

Regards,

Roger
