JetStreamSubscriber overview
Added in v0.1.0
Table of contents
constructors
fromConsumer
Create a JetStreamSubscriber from an existing Consumer.
This is a convenience constructor that internally calls consume() on the consumer.
Signature
export declare const fromConsumer: (
consumer: JetStreamConsumer.Consumer,
options?: JetStreamSubscriberOptions,
consumeOptions?: Parameters<JetStreamConsumer.Consumer["consume"]>[0]
) => Effect.Effect<
JetStreamSubscriber,
NATSError.JetStreamConsumerError | NATSError.NATSConnectionError,
NATSConnection.NATSConnection
>
Added in v0.1.0
fromConsumerMessages
Create a JetStreamSubscriber from an existing ConsumerMessages and Consumer.
This constructor is useful when you want to control the consumer lifecycle separately from the subscriber.
Signature
export declare const fromConsumerMessages: (
consumerMessages: JetStreamConsumer.ConsumerMessages,
consumer: JetStreamConsumer.InfoableConsumer,
options?: JetStreamSubscriberOptions
) => Effect.Effect<JetStreamSubscriber, NATSError.NATSConnectionError, NATSConnection.NATSConnection>
Added in v0.1.0
models
JetStreamSubscriber (interface)
Signature
export interface JetStreamSubscriber
extends Subscriber.Subscriber<
JetStreamSubscriberResponse.JetStreamSubscriberResponse,
JetStreamMessage.JetStreamMessage
> {
readonly [TypeId]: TypeId
}
Added in v0.1.0
JetStreamSubscriberApp (type alias)
Signature
export type JetStreamSubscriberApp<E, R> = SubscriberApp.SubscriberApp<
JetStreamSubscriberResponse.JetStreamSubscriberResponse,
JetStreamMessage.JetStreamMessage,
E,
R
>
Added in v0.7.0
JetStreamSubscriberOptions (interface)
Signature
export interface JetStreamSubscriberOptions {
uninterruptible?: boolean
handlerTimeout?: Duration.DurationInput
}
Added in v0.1.0
type ids
TypeId
Signature
export declare const TypeId: typeof TypeId
Added in v0.1.0
TypeId (type alias)
Signature
export type TypeId = typeof TypeId
Added in v0.1.0