Properties
Optional
ALPNProtocols
ALPNProtocols?: Buffer | string[] | Uint8Array | Buffer[] | Uint8Array[]
Optional
auth
auth?: string
Optional
authPacket
authPacket?: Partial<IAuthPacket>
Optional
autoAssignTopicAlias
autoAssignTopicAlias?: boolean
Optional
autoUseTopicAlias
autoUseTopicAlias?: boolean
Optional
binary
binary?: boolean
Optional
browserBufferSize
browserBufferSize?: number
Optional
browserBufferTimeout
browserBufferTimeout?: number
Optional
ca
ca?: string | Buffer | string[] | Buffer[]
Optional
caPaths
caPaths?: string | string[]
Optional
cert
cert?: string | Buffer | string[] | Buffer[]
Optional
certPath
certPath?: string
Optional
clean
clean?: boolean
Optional
clientId
clientId?: string
Optional
connectTimeout
connectTimeout?: number
Optional
customHandleAcks
customHandleAcks?: AckHandler
Optional
defaultProtocol
defaultProtocol?: MqttProtocol
Optional
encoding
encoding?: BufferEncoding
Optional
host
host?: string
Optional
hostname
hostname?: string
Optional
incomingStore
incomingStore?: IStore
Optional
keepalive
keepalive?: number
Optional
key
key?: string | any[] | Buffer | string[] | Buffer[]
Optional
keyPath
keyPath?: string
Optional
log
log?: ((...args) => void)
Type declaration
-
- (...args): void
-
Returns void
Optional
manualConnect
manualConnect?: boolean
Optional
messageIdProvider
messageIdProvider?: IMessageIdProvider
Optional
objectMode
objectMode?: boolean
Optional
outgoingStore
outgoingStore?: IStore
Optional
password
password?: string | Buffer
Optional
path
path?: string
Optional
port
port?: number
Optional
prefix
prefix?: string
Optional
properties
properties?: {
authenticationData?: Buffer;
authenticationMethod?: string;
maximumPacketSize?: number;
receiveMaximum?: number;
requestProblemInformation?: boolean;
requestResponseInformation?: boolean;
sessionExpiryInterval?: number;
topicAliasMaximum?: number;
userProperties?: UserProperties;
}
Type declaration
-
Optional
authenticationData?: Buffer
-
Optional
authenticationMethod?: string
-
Optional
maximumPacketSize?: number
-
Optional
receiveMaximum?: number
-
Optional
requestProblemInformation?: boolean
-
Optional
requestResponseInformation?: boolean
-
Optional
sessionExpiryInterval?: number
-
Optional
topicAliasMaximum?: number
-
Optional
userProperties?: UserProperties
Optional
protocol
protocol?: MqttProtocol
Optional
protocolId
protocolId?: "MQTT" | "MQIsdp"
Optional
protocolVersion
protocolVersion?: 4 | 5 | 3
Optional
query
query?: Record<string, string>
Optional
queueQoSZero
queueQoSZero?: boolean
Optional
reconnectPeriod
reconnectPeriod?: number
Optional
rejectUnauthorized
rejectUnauthorized?: boolean
Optional
reschedulePings
reschedulePings?: boolean
Optional
resubscribe
resubscribe?: boolean
Optional
servername
servername?: string
Optional
servers
servers?: {
host: string;
port: number;
protocol?: "wss" | "ws" | "mqtt" | "mqtts" | "tcp" | "ssl" | "wx" | "wxs";
}[]
Type declaration
-
host: string
-
port: number
-
Optional
protocol?: "wss" | "ws" | "mqtt" | "mqtts" | "tcp" | "ssl" | "wx" | "wxs"
Optional
transformWsUrl
transformWsUrl?: ((url, options, client) => string)
Type declaration
-
- (url, options, client): string
-
Parameters
-
url: string
-
options: IClientOptions
-
client: default
Returns string
Optional
username
username?: string
Optional
will
will?: {
payload: Buffer;
properties?: {
contentType?: string;
correlationData?: Buffer;
messageExpiryInterval?: number;
payloadFormatIndicator?: boolean;
responseTopic?: string;
userProperties?: UserProperties;
willDelayInterval?: number;
};
qos?: QoS;
retain?: boolean;
topic: string;
}
Type declaration
-
payload: Buffer
-
Optional
properties?: {
contentType?: string;
correlationData?: Buffer;
messageExpiryInterval?: number;
payloadFormatIndicator?: boolean;
responseTopic?: string;
userProperties?: UserProperties;
willDelayInterval?: number;
}
-
Optional
contentType?: string
-
Optional
correlationData?: Buffer
-
Optional
messageExpiryInterval?: number
-
Optional
payloadFormatIndicator?: boolean
-
Optional
responseTopic?: string
-
Optional
userProperties?: UserProperties
-
Optional
willDelayInterval?: number
-
Optional
qos?: QoS
-
Optional
retain?: boolean
-
topic: string
Optional
writeCache
writeCache?: boolean
Optional
wsOptions
wsOptions?: any
Topic prefix