mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-10 18:39:38 -06:00
- Introduced Kafka support in the Evolution API, allowing for real-time event streaming and processing. - Updated environment configuration to include Kafka-related variables. - Added KafkaController and KafkaRouter for managing Kafka events. - Enhanced event management to support Kafka alongside existing integrations. - Updated database schemas and migrations for Kafka integration in both MySQL and PostgreSQL. - Documented Kafka integration in the README file.
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
import { KafkaRouter } from '@api/integrations/event/kafka/kafka.router';
|
|
import { NatsRouter } from '@api/integrations/event/nats/nats.router';
|
|
import { PusherRouter } from '@api/integrations/event/pusher/pusher.router';
|
|
import { RabbitmqRouter } from '@api/integrations/event/rabbitmq/rabbitmq.router';
|
|
import { SqsRouter } from '@api/integrations/event/sqs/sqs.router';
|
|
import { WebhookRouter } from '@api/integrations/event/webhook/webhook.router';
|
|
import { WebsocketRouter } from '@api/integrations/event/websocket/websocket.router';
|
|
import { Router } from 'express';
|
|
|
|
export class EventRouter {
|
|
public readonly router: Router;
|
|
|
|
constructor(configService: any, ...guards: any[]) {
|
|
this.router = Router();
|
|
|
|
this.router.use('/webhook', new WebhookRouter(configService, ...guards).router);
|
|
this.router.use('/websocket', new WebsocketRouter(...guards).router);
|
|
this.router.use('/rabbitmq', new RabbitmqRouter(...guards).router);
|
|
this.router.use('/nats', new NatsRouter(...guards).router);
|
|
this.router.use('/pusher', new PusherRouter(...guards).router);
|
|
this.router.use('/sqs', new SqsRouter(...guards).router);
|
|
this.router.use('/kafka', new KafkaRouter(...guards).router);
|
|
}
|
|
}
|