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).
You can also specify mqtt
or mqtts
if the client runs in a
browser to open a (secure) websocket connection.
Optional
connectTime 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.
Optional
heartbeatHeartbeat interval in seconds for exchanging keep alive messages between MQTT broker and client (optional).
Defaults to 15 seconds (as recommended by VDA 5050 specification); set to 0 to disable.
Optional
passwordThe password required by your MQTT broker (optional).
Optional
protocolThe MQTT protocol version used to connect to the broker (optional).
If not specified, value defaults to "3.1.1"
.
Optional
reconnectInterval in milliseconds between two reconnection attempts (optional).
Defaults to 1000 ms. Disable auto reconnect by setting to 0.
Optional
tlsConnection options for mqtts - MQTT over TLS (optional).
Default is {}
. Options are passed through to
tls.connect()
.
If you run your MQTT connection over WebSockets, use wsOptions
instead.
Optional
ca?: string | string[] | Buffer | Buffer[]Optionally override the trusted CA certificates in PEM format (optional).
Optional
cert?: string | string[] | Buffer | Buffer[]Cert chains in PEM format (optional).
Optional
key?: string | string[] | Buffer | { Private keys in PEM format (optional).
Optional
passphrase?: stringShared passphrase used for a single private key and/or a PFX.
Optional
pfx?: string | string[] | Buffer | Buffer[] | { 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.
Optional
rejectIf not false, the server certificate is verified against the list of supplied CAs (optional). Defaults to true.
If you are using a self-signed certificate, additionally
pass the rejectUnauthorized: false
option. Beware that you are
exposing yourself to man in the middle attacks, so it is a
configuration that should never be used for production environments.
Optional
topicDefines the MQTT topic structure as a formatted string with placeholders according to the VDA 5050 protocol specification (optional).
Used to create MQTT topics for publication and subscription based on the following format specifiers:
%interfaceName%
- Name of the used interface%majorVersion%
- Major version number prepended by a "v"
%manufacturer%
- Manufacturer of the AGV (e.g. RobotCompany)%serialNumber%
- Unique AGV Serial Number consisting of the following
characters: A-Z a-z 0-9 _ . : -
%topic%
- VDA 5050 subtopic name (see enum Topic
)The MQTT topic structure is not strictly defined to support a mandatory
topic structure of cloud-based MQTT brokers. While the %topic%
placeholder must be present in any case the other ones may be
omitted.
Note that any of the defined placeholders must always make up a complete MQTT topic level.
If this option is not specified, the default format looks like this:
%interfaceName%/%majorVersion%/%manufacturer%/%serialNumber%/%topic%
Example: uagv/v2/KIT/0001/order
Optional
transformFor 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.
Optional
usernameThe username required by your MQTT broker (optional).
Optional
wsWebSocket 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.
Generated using TypeDoc
Defines MQTT transport options for a VDA 5050 client.