- mqtt-connect client host #!key (port 1883) (keepalive 5) bind-address username password tls-cafile tls-capath tls-certfile tls-keyfile tls-insecure tls-ocsp-required tls-use-os-certs tls-alpn socks5-host (socks5-port 1080) socks5-username socks5-password (reconnect-delay 1) (reconnect-delay-max 10) reconnect-exp-backoff tcp-nodelayprocedure
- host: the hostname or ip address of the broker to connect to.
- port: the network port to connect to. Default: 1883.
- keepalive: the number of seconds after which the broker should send a PING message to the client if no other messages have been exchanged in that time.
- bind-address: the hostname or ip address of the local network interface to bind to.
- username: the username to send as a string, or #f to disable authentication.
- password: the password to send as a string. Set to #f when username is valid in order to send just a username.
- tls-cafile: path to a file containing the PEM encoded trusted CA certificate files. Either cafile or capath must be set.
- tls-capath: path to a directory containing the PEM encoded trusted CA certificate files. See mosquitto.conf for more details on configuring this directory. Either cafile or capath must be set.
- tls-certfile: path to a file containing the PEM encoded certificate file for this client. If #f, keyfile must also be #f and no client certificate will be used.
- tls-keyfile: path to a file containing the PEM encoded private key for this client. If #f, certfile must also be #f and no client certificate will be used.
- tls-ocsp-required: Set whether OCSP checking on TLS connections is required. Set to #t to enable checking, or #f (the default) for no checking.
- tls-use-os-certs: Set to #t to instruct the client to load and trust OS provided CA certificates for use with TLS connections. Set to #f (the default) to only use manually specified CA certs.
- tls-alpn: If the broker being connected to has multiple services available on a single TLS port, such as both MQTT and WebSockets, use this option to configure the ALPN option for the connection.
- socks5-host: the SOCKS5 proxy host to connect to.
- socks5-port: the SOCKS5 proxy port to use.
- socks5-username: if set, use this username when authenticating with the proxy.
- socks5-password: if set and username is set, use this password when authenticating with the proxy.
- reconnect-delay: the number of seconds to wait between reconnects.
- reconnect-delay-max: the maximum number of seconds to wait between reconnects.
- reconnect-exp-backoff: use exponential backoff between reconnect attempts. Set to #t to enable exponential backoff.
- tcp-nodelay: Set to #t to disable Nagle’s algorithm on client sockets. This has the effect of reducing latency of individual messages at the potential cost of increasing the number of packets being sent. Defaults to #f, which means Nagle remains enabled.