Search
Preparing search index...
The search index is not available
@nestjs/microservices
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
ClientMqtt
Class ClientMqtt
Hierarchy
ClientProxy
ClientMqtt
Index
Constructors
constructor
Properties
connection
deserializer
logger
mqtt
Client
options
routing
Map
serializer
subscriptions
Count
url
Methods
assign
Packet
Id
close
connect
connect$
create
Client
create
Observer
create
Response
Callback
dispatch
Event
emit
get
Options
Prop
get
Request
Pattern
get
Response
Pattern
handle
Error
initialize
Deserializer
initialize
Serializer
merge
Close
Event
normalize
Pattern
publish
send
unsubscribe
From
Channel
Constructors
constructor
new
Client
Mqtt
(
options
:
MqttOptions
[
"options"
]
)
:
ClientMqtt
Parameters
options:
MqttOptions
[
"options"
]
Returns
ClientMqtt
Properties
Protected
connection
connection
:
Promise
<
any
>
Protected
deserializer
deserializer
:
ProducerDeserializer
Protected
Readonly
logger
logger
:
Logger
= new Logger(ClientProxy.name)
Protected
mqtt
Client
mqtt
Client
:
MqttClient
Protected
Readonly
options
options
:
MqttOptions
[
"options"
]
Protected
routing
Map
routing
Map
:
Map
<
string
,
Function
>
= new Map<string, Function>()
Protected
serializer
serializer
:
ProducerSerializer
Protected
Readonly
subscriptions
Count
subscriptions
Count
:
Map
<
string
,
number
>
= new Map<string, number>()
Protected
Readonly
url
url
:
string
Methods
Protected
assign
Packet
Id
assign
Packet
Id
(
packet
:
ReadPacket
)
:
ReadPacket
&
PacketId
Parameters
packet:
ReadPacket
Returns
ReadPacket
&
PacketId
close
close
(
)
:
void
Returns
void
connect
connect
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
Protected
connect$
connect$
(
instance
:
any
, errorEvent
?:
string
, connectEvent
?:
string
)
:
Observable
<
any
>
Parameters
instance:
any
Default value
errorEvent:
string
= ERROR_EVENT
Default value
connectEvent:
string
= CONNECT_EVENT
Returns
Observable
<
any
>
create
Client
create
Client
(
)
:
MqttClient
Returns
MqttClient
Protected
create
Observer
create
Observer<T>
(
observer
:
Observer
<
T
>
)
:
(
packet
:
WritePacket
)
=>
void
Type parameters
T
Parameters
observer:
Observer
<
T
>
Returns
(
packet
:
WritePacket
)
=>
void
(
packet
:
WritePacket
)
:
void
Parameters
packet:
WritePacket
Returns
void
create
Response
Callback
create
Response
Callback
(
)
:
(
channel
:
string
, buffer
:
Buffer
)
=>
any
Returns
(
channel
:
string
, buffer
:
Buffer
)
=>
any
(
channel
:
string
, buffer
:
Buffer
)
:
any
Parameters
channel:
string
buffer:
Buffer
Returns
any
Protected
dispatch
Event
dispatch
Event
(
packet
:
ReadPacket
)
:
Promise
<
any
>
Parameters
packet:
ReadPacket
Returns
Promise
<
any
>
emit
emit<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult =
any
TInput =
any
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Protected
get
Options
Prop
get
Options
Prop<T, K>
(
obj
:
T
, prop
:
K
, defaultValue
?:
T
[
K
]
)
:
T[K]
Type parameters
T
:
ClientOptions
[
"options"
]
K
:
keyof
T
Parameters
obj:
T
prop:
K
Default value
defaultValue:
T
[
K
]
= undefined
Returns
T[K]
get
Request
Pattern
get
Request
Pattern
(
pattern
:
string
)
:
string
Parameters
pattern:
string
Returns
string
get
Response
Pattern
get
Response
Pattern
(
pattern
:
string
)
:
string
Parameters
pattern:
string
Returns
string
handle
Error
handle
Error
(
client
:
MqttClient
)
:
void
Parameters
client:
MqttClient
Returns
void
Protected
initialize
Deserializer
initialize
Deserializer
(
options
:
ClientOptions
[
"options"
]
)
:
void
Parameters
options:
ClientOptions
[
"options"
]
Returns
void
Protected
initialize
Serializer
initialize
Serializer
(
options
:
ClientOptions
[
"options"
]
)
:
void
Parameters
options:
ClientOptions
[
"options"
]
Returns
void
merge
Close
Event
merge
Close
Event<T>
(
instance
:
MqttClient
, source$
:
Observable
<
T
>
)
:
Observable
<
T
>
Type parameters
T =
any
Parameters
instance:
MqttClient
source$:
Observable
<
T
>
Returns
Observable
<
T
>
Protected
normalize
Pattern
normalize
Pattern
(
pattern
:
MsPattern
)
:
string
Parameters
pattern:
MsPattern
Returns
string
Protected
publish
publish
(
partialPacket
:
ReadPacket
, callback
:
(
packet
:
WritePacket
)
=>
any
)
:
Function
Parameters
partialPacket:
ReadPacket
callback:
(
packet
:
WritePacket
)
=>
any
(
packet
:
WritePacket
)
:
any
Parameters
packet:
WritePacket
Returns
any
Returns
Function
send
send<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult =
any
TInput =
any
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Protected
unsubscribe
From
Channel
unsubscribe
From
Channel
(
channel
:
string
)
:
void
Parameters
channel:
string
Returns
void
Globals
Client
Mqtt
constructor
connection
deserializer
logger
mqtt
Client
options
routing
Map
serializer
subscriptions
Count
url
assign
Packet
Id
close
connect
connect$
create
Client
create
Observer
create
Response
Callback
dispatch
Event
emit
get
Options
Prop
get
Request
Pattern
get
Response
Pattern
handle
Error
initialize
Deserializer
initialize
Serializer
merge
Close
Event
normalize
Pattern
publish
send
unsubscribe
From
Channel
Generated using
TypeDoc