Connectum API Reference / @connectum/events-nats / types / NatsLifecycleCallbacks
Interface: NatsLifecycleCallbacks ​
Defined in: types.ts:117
Callbacks for the connection lifecycle of the NATS adapter.
Properties ​
onLifecycle? ​
readonlyoptionalonLifecycle?: (event) =>void|Promise<void>
Defined in: types.ts:125
Called for every NatsLifecycleEvent. It should not throw: a thrown exception or a rejected returned promise is isolated and reported as a lifecycle-error event, and a failure while handling that one is dropped. A returned promise is not awaited.
Events of the initial dial that happen before connect() returns are not available from the client.
Parameters ​
event ​
Returns ​
void | Promise<void>