Can the broker host address be changed
Closed this issue · 3 comments
Hello, do you mean if it's possible to reach the broker hosted on a server behind a DNS domain instead of an IP address? Yes it possible but the setup is independent from the broker itself.
Sorry let me re-write the question.
Hello, do you mean if it's possible to reach the broker hosted on a server behind a DNS domain instead of an IP address? Yes it possible but the setup is independent from the broker itself.
Instead of using the IP address of the device in a network as host address, can it be set to something else like e.g: "kmqtt.test.mqtt" that points to 0.0.0.0 ? The Broker also takes a host as argument in its constructor. Therefore, I was wondering if that was possible.
Instead of using the IP address of the device in a network as host address, can it be set to something else like e.g: "kmqtt.test.mqtt" that points to 0.0.0.0 ? The Broker also takes a host as argument in its constructor. Therefore, I was wondering if that was possible.
Yes it is possible, but it is not something related to the broker, rather a configuration of the DNS server. You still have to bind to an interface, or to all of them (with 0.0.0.0). But then if you need this on the local network, your DNS server is probably your router and you need to configure a mapping of desired hostname to device IP address. If you are on the Internet then you need to buy a domain and configure that to match the public IP address.
There is an alternative in the local network. If your device hosting the broker uses DHCP, you can specify the hostname and domain name to give it a local name, provided you have a DHCP and DNS server running, most likely in the router.
This is out of scope of the project though, I suggest doing additional research on the information I provided.