Skip to content

UnsubscribeAdapter

faststream.nats.subscriber.subscription.UnsubscribeAdapter #

UnsubscribeAdapter(subscription)

Bases: Unsubscriptable, Generic[WatchableT]

Source code in faststream/nats/subscriber/subscription.py
def __init__(self, subscription: WatchableT) -> None:
    self.obj = subscription

obj instance-attribute #

obj = subscription

unsubscribe async #

unsubscribe()
Source code in faststream/nats/subscriber/subscription.py
async def unsubscribe(self) -> None:
    await self.obj.stop()