Connection Url to MQTT broker (schema protocol://host:port
, e.g.
mqtt://localhost:1883
).
Supported protocols include mqtt
, mqtts
, tcp
, tls
, ws
, wss
,
wx
, wxs
(WeChat Mini), ali
, alis
(Ali Mini).
Time in milliseconds to wait for a connection acknowledgement message from the broker (optional).
Defaults to 30000 ms. If no CONNACK is received within the given time, the connection is aborted.
Keep alive interval in seconds (optional).
Defaults to 60 seconds, set to 0 to disable.
The level used to log errors, informational, as well as debug messages generated by the binding (optional).
Messages corresponding to the specified log level are emitted on the "error", "info", or "debug" event, respectively. If level is "error", only errors are emitted; if level is "info", only "error" and "info" messages are emitted; if level is "debug", all messages are emitted.
If not specified, the log level defaults to "error".
Namespace used to isolate different Coaty applications running with the same binding type in the same networking infrastructure (optional).
Communication events are only routed between agents within a common communication namespace: an agent publishes and observes communication events with respect to the given namespace.
If not specified (i.e. undefined), a default namespace named "-" is used.
The password required by your MQTT broker (optional).
Interval in milliseconds between two reconnection attempts (optional).
Defaults to 1000 ms. Disable auto reconnect by setting to 0.
Determines whether to enable cross-namespace communication between agents in special use cases (optional).
If true
, an agent receives communication events published by any
agent running with the same binding type in the same networking
infrastructure, regardless of namespace.
If not specified or false
, this option is not enabled.
Connection options for mqtts - MQTT over TLS (optional).
Default is {}. Options are passed through to
tls.connect()
.
Any other option supported by
tls.connect()
.
Optionally override the trusted CA certificates in PEM format (optional).
Cert chains in PEM format (optional).
Private keys in PEM format (optional).
Shared passphrase used for a single private key and/or a PFX.
PFX or PKCS12 encoded private key and certificate chain. pfx is an
alternative to providing key
and cert
individually. PFX is
usually encrypted, if it is, passphrase
will be used to decrypt it.
If not false, the server certificate is verified against the list of supplied CAs (optional). Defaults to true.
The username required by your MQTT broker (optional).
WebSocket specific connection options (optional).
Default is {}. Only used for WebSocket connections.
For possible options have a look at: https://github.com/websockets/ws/blob/master/doc/ws.md.
For WebSocket ws/wss protocols only (optional). Can be used to implement signing urls or authentication options which upon reconnect can have become expired.
For details, see here.
Generated using TypeDoc
Options provided by the MQTT communication binding.