@dugongjs/kafkajs
Version:
14 lines (13 loc) • 963 B
TypeScript
import type { IMessageChannelParticipant } from "@dugongjs/core";
/**
* MessageChannelParticipantKafkaJs is an implementation of the IMessageChannelParticipant interface that provides a method to generate message channel IDs for Kafka topics based on the origin and aggregate type.
*/
export declare class MessageChannelParticipantKafkaJs implements IMessageChannelParticipant {
/**
* Generates a unique message channel ID based on the provided origin and aggregate type.
* @param origin The origin or source of the messages (e.g., service name or application name).
* @param aggregateType The type of aggregate or domain entity that the channel is associated with (e.g., "Order", "User", etc.).
* @returns A unique message channel ID string in kebab-case format, combining the origin and aggregate type. For example: "my-service-order".
*/
generateMessageChannelIdForAggregate(origin: string, aggregateType: string): string;
}