Closed kenguru33 closed 2 years ago
Access the underlaying nats connection object through a connected hook.
Example code:
const logger = new Logger(); const options: CustomStrategy = { strategy: new NatsJetStreamServer({ connectionOptions: { name: 'myservice-listener', connectedHook: async (nc) => { logger.log('Connected to ' + nc.getServer()); for await (const s of nc.status()) { if (s.type == DebugEvents.PingTimer) { console.log('We got ping timer attempt: ' + s.data); } } }, },
Access the underlaying nats connection object through a connected hook.
Example code: