UNPKG

@vpriem/kafka-broker

Version:

Easily compose and manage your kafka resources in one place

18 lines 948 B
/// <reference types="node" /> import EventEmitter from 'events'; import { SchemaRegistry } from '@kafkajs/confluent-schema-registry'; import { BrokerConfig, BrokerContainerConfig, BrokerInterface, PublishMessage, MessageValue, PublishResult, SubscriptionInterface } from './types'; export declare class Broker extends EventEmitter implements BrokerInterface { private readonly config; private readonly registry?; private readonly producers; private readonly subscriptions; constructor(config: BrokerConfig | BrokerContainerConfig); namespace(): string; schemaRegistry(): SchemaRegistry | undefined; publish<V = MessageValue>(publicationName: string, messageOrMessages: PublishMessage<V> | PublishMessage<V>[]): Promise<PublishResult[] | null>; subscription(name: string): SubscriptionInterface; subscriptionList(): SubscriptionInterface; shutdown(): Promise<void>; } //# sourceMappingURL=Broker.d.ts.map