Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
class TypedSubscription
implements Sub<T>
import { TypedSubscription } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.ts";

TypedSubscription wraps a subscription to provide payload specific subscription semantics. That is messages are a transport for user data, and the data is presented as application specific data to the client.

Constructors

new
TypedSubscription(
subject: string,
)

Properties

adapter: MsgAdapter<T>
readonly
closed: Promise<void>
subIterDone: Deferred<void>

Methods

callback(e: NatsError | null, msg: Msg): void
drain(): Promise<void>
getID(): number
getMax(): number | undefined
getPending(): number
getProcessed(): number
getReceived(): number
getSubject(): string
isClosed(): boolean
isDraining(): boolean
unsubscribe(max?: number): void