refactor(shared-ts,iam,core-edu,content,msg): remove outbox polling publisher
M8: Debezium CDC now handles outbox table to Kafka (ADR-032) - Remove OutboxPublisher class from shared-ts - Remove publisher from iam/core-edu/content/msg lifecycle and modules - OutboxService retained for transactional outbox table writes - Debezium monitors binlog and pushes to Kafka automatically
This commit is contained in:
@@ -15,11 +15,7 @@ import { GraphqlModule } from "./graphql/graphql.module.js";
|
||||
import { RouterAuthGuard } from "./graphql/router-auth.guard.js";
|
||||
import { OutboxModule } from "@edu/shared-ts/outbox";
|
||||
import { getDbInstance } from "./config/database.js";
|
||||
import {
|
||||
getKafkaProducer,
|
||||
connectKafkaProducer,
|
||||
IAM_KAFKA_TOPICS,
|
||||
} from "./config/kafka.js";
|
||||
import { connectKafkaProducer, IAM_KAFKA_TOPICS } from "./config/kafka.js";
|
||||
|
||||
/**
|
||||
* IAM 根模块(v2.1)。
|
||||
@@ -42,13 +38,9 @@ import {
|
||||
config: {
|
||||
tableName: "iam_outbox",
|
||||
kafkaTopic: IAM_KAFKA_TOPICS.USER_EVENTS,
|
||||
pollIntervalMs: 1000,
|
||||
batchSize: 20,
|
||||
maxRetryCount: 5,
|
||||
retryBackoffMs: 1000,
|
||||
},
|
||||
db: getDbInstance(),
|
||||
kafkaProducer: getKafkaProducer(),
|
||||
}),
|
||||
],
|
||||
providers: [
|
||||
@@ -61,9 +53,8 @@ export class AppModule implements NestModule, OnModuleInit {
|
||||
private readonly logger = new Logger(AppModule.name);
|
||||
|
||||
async onModuleInit(): Promise<void> {
|
||||
// 连接 Kafka producer(Outbox 投递前置依赖)
|
||||
// v2.1 注:OutboxPublisher 轮询线程将被废弃(M8),由 Debezium 接管投递
|
||||
// 此处保留 Kafka producer 连接用于其他场景(如直接发事件)
|
||||
// 连接 Kafka producer(健康检查 /healthz 依赖 producer 探活)
|
||||
// v2.1(M8):OutboxPublisher 轮询线程已移除,outbox 投递由 Debezium CDC 接管
|
||||
try {
|
||||
await connectKafkaProducer();
|
||||
this.logger.log("Kafka producer connected");
|
||||
|
||||
Reference in New Issue
Block a user