rabbitmq / rabbitmq-mqtt

RabbitMQ MQTT plugin

Home Page:https://www.rabbitmq.com/mqtt.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide a way to pick client connection vhost from a port

michaelklishin opened this issue · comments

Similar to #73 but with a listener port-to-vhost mapping. With a large number of clients and certificates the solution in #73 is of limited value.

So there should be a way to map ports to vhosts via global runtime parameters (and thus CLI and HTTP API). This is more flexible and nicer compared to introducing new config file properties.

When both this mapping and the one in #73 are used and return a value, #73 takes precedence (we believe client certificates is a more fine grained piece of configuration than TCP listeners). If no mappings return a value, the plugin will fall back to its configured vhost (most coarse-grained configuration value).

Unlike #73, this feature makes sense for non-TLS connections.

Note that the ports specified in this mapping won't have TCP or TLS listeners configured and started automatically. That should be done the same way as presently.

Per discussion with @acogoluegnes.