njh / ruby-mqtt

Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
http://www.rubydoc.info/gems/mqtt
MIT License
541 stars 135 forks source link

How to connect virtual hosts #99

Closed vincar closed 7 years ago

vincar commented 7 years ago

Hi! How to connect mq with virtual hosts, I sorry that I can not find the argument in the Client.rb file

MQTT::Client.connect(host: '127.0.0.1', username: 'admin', password: 'admin', vhost: 'common')

is not work!!!

njh commented 7 years ago

Virtual Hosts are not supported in MQTT v3.1.1 - the only official standard for MQTT.

I think they may be added in MQTT v5.

vincar commented 7 years ago

ok, Thanks @njh