Setu-TS
    Preparing search index...

    Kafka message broker implementation.

    0.1.0

    Implements

    • MessageBrokerAdapter
    Index
    • Boolean port member (M70c): false only when positively unreachable.

      Returns Promise<boolean>

      true when reachable or unprobeable, false when the fault window is active

      0.1.0

    • Publishes a message to a topic.

      Type Parameters

      • T

        The message payload type

      Parameters

      • topic: string

        The topic to publish to

      • message: T

        The message payload

      • Optionaloptions: PublishOptions

        Caller headers, ordering key and de-duplication id

      Returns Promise<void>

      Resolves when published

      When publishTimeoutMs expires; delivery remains possible

      0.1.0

    • Internal

      Publishes with framework-owned headers under the configured acknowledgement bound.

      Type Parameters

      • T

      Parameters

      • topic: string

        Destination topic

      • message: T

        Payload to serialize

      • headers: Readonly<Record<string, string>>

        Framework-owned transport headers

      • Optionaloptions: PublishOptions

        Caller headers, ordering key and de-duplication id

      Returns Promise<void>

      Resolves when the transport acknowledges the publish

      When publishTimeoutMs expires; delivery remains possible

    • Tri-state backend reachability (M70c).

      Faulted supervisor → false immediately. Otherwise a dedicated admin's describeCluster round trip is cached for 5 s and bounded at 2 s. A KafkaJSRequestTimeoutError (including a nested cause) or an expired bound yields undefined; other errors yield false. Without admin on an injected factory reachability is unknown. Injected admin timeouts are the application's.

      Returns Promise<boolean | undefined>

      true/false/undefined as described

      0.1.0

    • Sends a request and awaits its single correlated reply.

      Replies arrive on the shared reply topic (KafkaOptions.replyTopic, default 'messaging.replies'), which must exist — this broker creates no topics; its admin is used only for metadata and group offsets. Either pre-create it or enable auto.create.topics.enable; otherwise the underlying producer error surfaces from this call rather than hanging until the timeout.

      Type Parameters

      • TReq

        The request payload type

      • TRes

        The reply payload type

      Parameters

      • topic: string

        Destination topic a responder is listening on

      • message: TReq

        The request payload

      • Optionaloptions: RequestOptions

        Reply timeout behavior

      Returns Promise<TRes>

      The reply payload

      When no reply arrives within timeoutMs

      When the responder throws

      0.1.0