import { type JetStreamClient } from "https://deno.land/x/natsws@v1.28.0/src/mod.ts";
Interface for interacting with JetStream data
Properties
Accessor for the JetStream materialized views API
Returns the interface for accessing Consumers. Consumers allow you to process messages stored in a stream. To create a consumer use JetStreamManager.
Methods
Publishes a message to a stream. If not stream is configured to store the message, the request will fail with ErrorCode.NoResponders error.
Retrieves a single message from JetStream
Similar to pull, but able to configure the number of messages, etc. via PullOptions.
Creates a pull subscription. A pull subscription relies on the client to request more messages from the server. If the consumer doesn't exist, it will be created matching the consumer options provided.
It is recommended that a consumer be created first using JetStreamManager APIs and then use the bind option to simply attach to the created consumer.
If the filter subject is not specified in the options, the filter will be set to match the specified subject.
It is more efficient than fetch or pull because a single subscription is used between invocations.
Creates a push subscription. The JetStream server feeds messages to this subscription without the client having to request them. The rate at which messages are provided can be tuned by the consumer by specifying ConsumerConfig#rate_limit_bps | ConsumerConfig.rate_limit_bps and/or ConsumerOpts | maxAckPending.
It is recommended that a consumer be created first using JetStreamManager APIs and then use the bind option to simply attach to the created consumer.
If the filter subject is not specified in the options, the filter will be set to match the specified subject.
Returns a JetStreamManager that uses the same JetStreamOptions as the current JetStream context