Listener - nats : Listener

Represents a connection which will be used for subscription.

Constructor

__init

(ConnectionConfig | Connection c)

LifeCycle Methods

LifeCycle Methods

__attach

(service s, string? name)

returns error?

Binds the NATS consumer to a service.

Parameters

  • s service
  • Type descriptor of the service.

  • name string? - ()
  • Name of the service.

  • Return Type

    (error?)
  • Nil or error upon failure to register listener.

__start

()

returns error?

Starts the listener in the lifecyle.

  • Return Type

    (error?)
  • Error or ().

__stop

()

returns error?

Stops the listener in the lifecyle.

  • Return Type

    (error?)
  • error or ().