Revert "fix(2.0): 所有 Kafka consumer 改为 fromBeginning: true 确保 full-reset 全量同步"

This reverts commit 534d4ce70c.
This commit is contained in:
hailin 2026-01-29 22:41:40 -08:00
parent a41feb841f
commit 6b92ab0dd8
7 changed files with 6 additions and 12 deletions

View File

@ -120,12 +120,6 @@ CDC_CONSUMER_GROUPS=(
"auth-service-cdc-group"
"auth-service-cdc-group-wallet"
"mining-admin-service-cdc-group"
"mining-blockchain-service-withdrawal-events"
"mining-blockchain-service-mpc-events"
"mining-blockchain-service-deposit-acks"
"trading-service-cdc-group"
"trading-service-mm-deposit-group"
"mining-service-contribution-sync"
)
# Debezium Outbox Connectors (for 2.0 service events -> mining-admin-service)

View File

@ -76,7 +76,7 @@ export class DepositAckConsumerService implements OnModuleInit, OnModuleDestroy
await this.consumer.subscribe({
topics: Object.values(ACK_TOPICS),
fromBeginning: true,
fromBeginning: false,
});
this.logger.log(`[SUBSCRIBE] Subscribed to ACK topics`);

View File

@ -118,7 +118,7 @@ export class MpcEventConsumerService implements OnModuleInit, OnModuleDestroy {
this.logger.log(`[CONNECT] MPC Event Kafka consumer connected successfully`);
// Subscribe to MPC topics
await this.consumer.subscribe({ topics: Object.values(MPC_TOPICS), fromBeginning: true });
await this.consumer.subscribe({ topics: Object.values(MPC_TOPICS), fromBeginning: false });
this.logger.log(`[SUBSCRIBE] Subscribed to MPC topics: ${Object.values(MPC_TOPICS).join(', ')}`);
// Start consuming

View File

@ -91,7 +91,7 @@ export class WithdrawalEventConsumerService implements OnModuleInit, OnModuleDes
await this.consumer.subscribe({
topics: Object.values(WITHDRAWAL_TOPICS),
fromBeginning: true,
fromBeginning: false,
});
this.logger.log(`[SUBSCRIBE] Subscribed to withdrawal topics`);

View File

@ -40,7 +40,7 @@ export class ContributionEventHandler implements OnModuleInit {
// 订阅多个 topic
for (const topic of topics) {
await this.consumer.subscribe({ topic, fromBeginning: true });
await this.consumer.subscribe({ topic, fromBeginning: false });
}
await this.consumer.run({

View File

@ -75,7 +75,7 @@ export class CdcConsumerService implements OnModuleInit, OnModuleDestroy {
await this.consumer.subscribe({
topics: [walletTopic],
fromBeginning: true, // full-reset 时从头开始同步
fromBeginning: false, // 不需要处理历史消息
});
this.logger.log(`Subscribed to topic: ${walletTopic}`);

View File

@ -81,7 +81,7 @@ export class MarketMakerDepositConsumerService implements OnModuleInit, OnModule
await this.consumer.subscribe({
topics: [topic],
fromBeginning: true,
fromBeginning: false,
});
this.logger.log(`Subscribed to topic: ${topic}`);