Unsubscribe
Unsubscribing
Section titled “Unsubscribing”createService returns a connection API. You can use it to programmatically disconnect:
const service = createService('1.0.0', handler)
// Later — gracefully disconnectawait service.close()Call close() on the Service instance to stop consuming messages:
service = Service("1.0.0", handler)
# Later — gracefully disconnectservice.close()