UNPKG

@dtu-olp-2024/kafka-nocobase

Version:

A NocoBase plugin for Apache Kafka integration, supporting message publishing, topic management, and event-driven workflows. Built for the DTU GreenHope project.

10 lines (9 loc) 434 B
import { Producer, Consumer } from 'kafkajs'; import Application, { DefaultContext, DefaultState } from '@nocobase/server'; export declare class KafkaEventListener { private producer; private consumer; constructor(producer: Producer, consumer: Consumer); initializeTopics(topics: string[], appInstance: Application<DefaultState, DefaultContext>): Promise<void>; emit(topic: string, message: any): Promise<void>; }