Skip to content

Documentation / @super-line/adapter-rabbitmq / createRabbitmqAdapter

Function: createRabbitmqAdapter()

createRabbitmqAdapter(options?): Promise<Adapter & object>

Defined in: index.ts:59

Create a RabbitMQ Adapter for broker-routed multi-node fan-out. Channels become routing keys on one durable direct exchange; each node owns one exclusive, auto-delete queue and binds only the channels it has local members for, so the broker selectively routes. At-most-once delivery, matching the library's model. Built on rabbitmq-client (automatic reconnection + topology recovery).

Parameters

options?

string | RabbitmqAdapterOptions

an amqp:// URL string or RabbitmqAdapterOptions.

Returns

Promise<Adapter & object>

Example

ts
const adapter = await createRabbitmqAdapter('amqp://localhost:5672')
createSuperLineServer(api, { server, adapter })

Released under the MIT License.