class RabbitMQAdapter
implements StreamAdapter

Constructors

new
RabbitMQAdapter(options: AdapterOptions)

Properties

private
readonly
assertedQueues: Set<string>
private
readonly
channel: Channel
private
readonly
configs: Map<string, QueueConfig>
private
readonly
defaultPrefetch: number
private
readonly
dlqNames: Set<string>
private
readonly
inflight: Map<string, Message>
private
readonly
pendingAssertions: Map<string, Promise<void>>
private
readonly
prefix: string
private
readonly
queueConfigs: Record<string, QueueOptions>

Methods

ack(
_queue: string,
...ids: string[],
): Promise<void>
private
assertQueue(queue: string): Promise<void>
close(): Promise<void>
private
getConfig(queue: string): QueueConfig
private
key(queue: string): string
nack(
_queue: string,
id: string,
_options?: NackOptions,
): Promise<void>
receive<T>(
queue: string,
count?: number,
): Promise<QueueMessage<T>[]>
send<T>(
queue: string,
data: T,
options?: SendOptions,
): Promise<string>
subscribe<T>(
queue: string,
options?: { signal?: AbortSignal; prefetch?: number; },
): AsyncIterable<QueueMessage<T>>