Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class SubscriptionImpl
implements Base, Subscription
import { SubscriptionImpl } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.ts";

Constructors

new
SubscriptionImpl(
protocol: ProtocolHandler,
subject: string,
)

Properties

optional
cleanupFn: (sub: Subscription, info?: unknown) => void
closed: Deferred<void>
optional
drained: Promise<void>
draining: boolean
optional
info: unknown
optional
max: number
protocol: ProtocolHandler
optional
queue: string
optional
requestSubject: string
sid: number
subject: string
optional
timer: Timeout<void>

Methods

callback(err: NatsError | null, msg: Msg)
close(): void
drain(): Promise<void>
getID(): number
getMax(): number | undefined
getSubject(): string
isClosed(): boolean
isDraining(): boolean
setPrePostHandlers(opts: { ingestionFilterFn?: IngestionFilterFn<Msg>; protocolFilterFn?: ProtocolFilterFn<Msg>; dispatchedFn?: DispatchedFn<Msg>; })
unsubscribe(max?: number): void