Listener -
nats
: Listener
Represents the NATS server connection to which a subscription service should be bound in order to receive messages of the corresponding subscription.
Constructor
__init
(Connection connection)
- connection Connection
-
An established NATS connection.
Methods
Stops consuming messages and detaches the service from the nats:Listener
.
Stops the nats:Listener
gracefully.
Stops the nats:Listener
forcefully.
LifeCycle Methods
Methods
Stops consuming messages and detaches the service from the nats:Listener
.
Parameters
- s service
-
Type descriptor of the service
-
Return Type
(error?) ()
or else anats:Error
upon failure to detach the service
Stops the nats:Listener
gracefully.
-
Return Type
(error?) ()
or else anats:Error
upon failure to stop the listener
Stops the nats:Listener
forcefully.
-
Return Type
(error?) ()
or else anats:Error
upon failure to stop the listener
LifeCycle Methods
Binds a service to the nats:Listener
.
Parameters
- s service
-
Type descriptor of the service
- name string? (default ())
-
Name of the service
-
Return Type
(error?) ()
or else anats:Error
upon failure to register the listener