Connectum API Reference / @connectum/events-amqp / types / AmqpAdapterOptions
Interface: AmqpAdapterOptions ​
Defined in: packages/events-amqp/src/types.ts:10
Options for creating an AMQP/RabbitMQ adapter.
Properties ​
consumerOptions? ​
readonlyoptionalconsumerOptions?:AmqpConsumerOptions
Defined in: packages/events-amqp/src/types.ts:50
Consumer options.
exchange? ​
readonlyoptionalexchange?:string
Defined in: packages/events-amqp/src/types.ts:28
Exchange name for publishing and subscribing.
Default ​
"connectum.events"exchangeOptions? ​
readonlyoptionalexchangeOptions?:AmqpExchangeOptions
Defined in: packages/events-amqp/src/types.ts:40
Exchange assertion options.
exchangeType? ​
readonlyoptionalexchangeType?:"headers"|"topic"|"direct"|"fanout"
Defined in: packages/events-amqp/src/types.ts:35
Exchange type.
Default ​
"topic"lifecycle? ​
readonlyoptionallifecycle?:AmqpLifecycleCallbacks
Defined in: packages/events-amqp/src/types.ts:117
Connection lifecycle callbacks. Connection errors are surfaced here — not just logged.
publisherOptions? ​
readonlyoptionalpublisherOptions?:AmqpPublisherOptions
Defined in: packages/events-amqp/src/types.ts:55
Publisher options.
publishTimeoutMs? ​
readonlyoptionalpublishTimeoutMs?:number
Defined in: packages/events-amqp/src/types.ts:127
Per-publish broker-outcome deadline in milliseconds. A publish whose ack/nack/return/connection-loss outcome does not arrive in time rejects with AmqpPublishTimeoutError (message state UNKNOWN — an at-least-once producer should republish).
Default ​
30000queueOptions? ​
readonlyoptionalqueueOptions?:AmqpQueueOptions
Defined in: packages/events-amqp/src/types.ts:45
Default queue assertion options.
queueOverrides? ​
readonlyoptionalqueueOverrides?:Record<string,AmqpQueueOverride>
Defined in: packages/events-amqp/src/types.ts:97
Map a consumer group name to an externally-named queue.
By default a group consumes from ${exchange}.${group}. An override lets a subscription attach to a queue from an external contract (with its own arguments) instead.
recovery? ​
readonlyoptionalrecovery?:boolean|AmqpRecoveryOptions
Defined in: packages/events-amqp/src/types.ts:111
Automatic connection recovery (delegated to amqplib's opt-in recovery). Enabled by default; pass false to restore no-reconnect behavior.
On every (re)connect the adapter re-creates its channels, re-applies topology (per topologyMode), and replays active subscriptions. In-flight publishes at the moment of a connection loss reject with AmqpConnectionError.
Default ​
true (amqplib defaults: 100ms initial, ×2, 30s cap, jitter 0.2, infinite retries)serialization? ​
readonlyoptionalserialization?:AmqpSerializationOptions
Defined in: packages/events-amqp/src/types.ts:66
Message serialization metadata and optional wire transcoding.
The adapter receives payloads as bytes (the EventBus serializes protobuf upstream); this option controls the AMQP contentType property and lets an application transcode the wire body — e.g. when the application serializes JSON itself and publishes through the adapter directly against an external AsyncAPI contract.
socketOptions? ​
readonlyoptionalsocketOptions?:Record<string,unknown>
Defined in: packages/events-amqp/src/types.ts:21
Socket options passed to amqplib.connect().
topology? ​
readonlyoptionaltopology?:AmqpTopology
Defined in: packages/events-amqp/src/types.ts:74
Explicit topology to declare on connect (and re-declare after recovery): exchanges, queues with arbitrary external names and raw arguments (e.g. x-dead-letter-exchange), and bindings — including exchange-to-exchange.
topologyMode? ​
readonlyoptionaltopologyMode?:AmqpTopologyMode
Defined in: packages/events-amqp/src/types.ts:88
How topology is established:
"assert"(default) — declare idempotently (assertExchange/assertQueue/bind);"check"— existence-only verification (checkExchange/checkQueue), fail fast with AmqpTopologyError on missing objects. AMQP offers no passive introspection: argument equivalence and binding presence are NOT verifiable in this mode (a conflicting redeclare elsewhere is PRECONDITION_FAILED 406);"skip"— no topology operations at all; the application owns topology.
Default ​
"assert"url ​
readonlyurl:string
Defined in: packages/events-amqp/src/types.ts:16
AMQP connection URL.
Example ​
"amqp://guest:guest@localhost:5672"