Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Broker Questions

Hi,

 * How/Can I set a domain name for the Mosquitto broker?

For normal MQTT there is no domain name to set, you don't do virtual
host based hosting like you can do with HTTP it's just a port at a known
IP address since the protocol doesn't encode the hostname in any part of
the connection packet you can't use it to route to different broker
instances based on the hostname used to connect to that single IP address.

Having said that it is possible to do this with both MQTT over
Websockets and MQTT over TLS using a frontend proxy (e.g. Nginx or
Traefik) since those wrapper protocols do include the hostname. See the
following 2 blog posts for details
https://www.hardill.me.uk/wordpress/2020/10/14/hostname-based-proxying-with-mqtt/
https://www.hardill.me.uk/wordpress/2020/10/17/more-mqtt-virtualhost-proxying/

* Is there a typical IP means for discovering MQTT brokers?

You can use DNS SRV records to discover a MQTT broker or similarly mDNS
to do local (on same subnet) broker discovery.

e.g. _mqtt._tcp or _mqtts._tcp


On 20/10/2020 01:00, Leinen, Rick wrote:
> I’m just starting out with MQTT and am wondering a couple of things:
> 
>  
> 
>   * How/Can I set a domain name for the Mosquitto broker?
>   * Is there a typical IP means for discovering MQTT brokers?
> 
>  
> 
> Thanks,
> 
>  
> 
> *Rick Leinen*
> Sr. Engineering Manager - R&D Projects
> 
> Controls
> *T: *503 404-5561*| C: *503 860-6305
> 
> *Leviton Manufacturing Co., Inc.*
> 20497 SW Teton Ave, Tualatin, OR 97062
> www.leviton.com <http://www.leviton.com/> *| *rleinen@xxxxxxxxxxx
> <mailto:rleinen@xxxxxxxxxxx>
> 
> /Stay Connected with Leviton Mobile Apps: www.leviton.com/apps
> <http://www.leviton.com/apps> /
> 
>  
> 
> 
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev
> 

-- 
https://www.hardill.me.uk/wordpress
https://github.com/hardillb
https://about.me/hardillb
https://flickr.com/photos/hardillb/
https://keybase.io/hardillb


Back to the top