interface KafkaOptions
Since 0.1.0

Kafka-specific options (internal use).

Properties

optional
brokers: readonly string[]

Kafka bootstrap brokers.

optional
client: IKafkaFactory

Injected Kafka factory.

optional
clientId: string

Kafka client ID (default: 'messaging-client').

optional
defaultQueue: string

Default consumer group name.

optional
replyTopic: string

Topic every request-reply response is published to and read back from.

Kafka topics are durable cluster resources and this broker creates none, so the topic must already exist (or auto.create.topics.enable must be on). Each broker instance reads it under its own consumer group, so every instance sees every reply and discards those it did not originate — give a high-traffic service its own reply topic to bound that fan-out.

optional
logger: { error: (msg: string) => void; }

Optional logger for error reporting.

Usage

import { type KafkaOptions } from "messaging-plugin/src/index.ts";