Skip to main content Link Search Menu Expand Document (external link)

JetStreamBatch overview

Added in v0.1.0


Table of contents


models

JetStreamBatch (interface)

Represents a NATS JetStream Batch

Signature

export interface JetStreamBatch {
  readonly [TypeId]: TypeId
  readonly id: string
  readonly count: number
  readonly add: (
    subj: string,
    payload?: Uint8Array | string,
    opts?: Partial<JetStream.BatchMessageOptions | JetStream.BatchMessageOptionsWithReply>
  ) => Effect.Effect<void, NATSError.JetStreamBatchError>
  readonly commit: (
    ...params: Parameters<JetStream.Batch["commit"]>
  ) => Effect.Effect<JetStream.BatchAck, NATSError.JetStreamBatchError>

  /** @internal */
  readonly batch: JetStream.Batch
}

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