basalt / queue-kafka/src / kafkaQueuePlugin
Function: kafkaQueuePlugin()
> kafkaQueuePlugin(options): BasaltPlugin<unknown>
Defined in: queue-kafka/src/index.ts:286
The Kafka-backed queue plugin — one line to put an app's jobs on Kafka:
ts
kafkaQueuePlugin({ brokers: ['localhost:9092'], jobs: [SendWelcome], workers: [{ queue: 'welcome' }] })Every backend ships a plugin of this shape (bullmqQueuePlugin, rabbitmqQueuePlugin, sqsQueuePlugin), so no backend is privileged in the core's API and @basaltkit/queue stays a pure contract. Use queuePlugin({ driver }) directly for a driver you wrote yourself.
Building the driver here, when the app is DEFINED, is safe: the constructor only reads defaults, and every connection is opened lazily on first use.
Parameters
options
Returns
BasaltPlugin<unknown>