fix(admin-service): 修复 Kafka topic 订阅不匹配问题
问题:admin-web 用户管理页面无数据
原因:admin-service 订阅的是 'identity.events',
但 identity-service 发送到的是具体的 topic 如 'identity.UserAccountCreated'
修复:将订阅的 topics 改为与 identity-service 的 IDENTITY_TOPICS 一致:
- identity.UserAccountCreated
- identity.UserAccountAutoCreated
- identity.PhoneBound
- identity.KYCSubmitted
- identity.KYCVerified
- identity.KYCRejected
- identity.UserAccountFrozen
- identity.UserAccountDeactivated
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8579529571
commit
a1a9a087c5
|
|
@ -118,8 +118,17 @@ export class UserEventConsumerService implements OnModuleInit, OnModuleDestroy {
|
|||
this.consumerGroup = this.configService.get<string>('KAFKA_CONSUMER_GROUP', 'admin-service-user-sync');
|
||||
this.ackTopic = 'identity.events.ack';
|
||||
|
||||
// 订阅的主题
|
||||
this.topics = ['identity.events'];
|
||||
// 订阅的主题 (与 identity-service 的 IDENTITY_TOPICS 保持一致)
|
||||
this.topics = [
|
||||
'identity.UserAccountCreated',
|
||||
'identity.UserAccountAutoCreated',
|
||||
'identity.PhoneBound',
|
||||
'identity.KYCSubmitted',
|
||||
'identity.KYCVerified',
|
||||
'identity.KYCRejected',
|
||||
'identity.UserAccountFrozen',
|
||||
'identity.UserAccountDeactivated',
|
||||
];
|
||||
|
||||
this.kafka = new Kafka({
|
||||
clientId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue