启动mq
This commit is contained in:
parent
e73e2f5ee8
commit
9fa6991ffd
@ -63,7 +63,7 @@ rocketmq:
|
|||||||
enabled: true
|
enabled: true
|
||||||
topic: "hyapp_room_outbox"
|
topic: "hyapp_room_outbox"
|
||||||
producer_group: "hyapp-room-outbox-producer"
|
producer_group: "hyapp-room-outbox-producer"
|
||||||
tencent_im_consumer_enabled: false
|
tencent_im_consumer_enabled: true
|
||||||
tencent_im_consumer_group: "hyapp-room-im-bridge"
|
tencent_im_consumer_group: "hyapp-room-im-bridge"
|
||||||
consumer_max_reconsume_times: 16
|
consumer_max_reconsume_times: 16
|
||||||
treasure_open:
|
treasure_open:
|
||||||
@ -73,7 +73,7 @@ rocketmq:
|
|||||||
consumer_group: "hyapp-room-treasure-open"
|
consumer_group: "hyapp-room-treasure-open"
|
||||||
consumer_max_reconsume_times: 16
|
consumer_max_reconsume_times: 16
|
||||||
outbox_worker:
|
outbox_worker:
|
||||||
# Docker 本地走 MQ,避免本地统计链路验证时混入真实 IM 直投副作用。
|
# Docker 和 testbox 走 MQ;room-service 同进程启动 IM bridge consumer 补偿房间群消息。
|
||||||
enabled: true
|
enabled: true
|
||||||
publish_mode: "mq"
|
publish_mode: "mq"
|
||||||
poll_interval: "1s"
|
poll_interval: "1s"
|
||||||
|
|||||||
@ -75,6 +75,26 @@ func TestLoadTencentExample(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestLoadDockerConfigStartsRoomIMBridgeWhenOutboxUsesMQ(t *testing.T) {
|
||||||
|
cfg, err := Load("../../configs/config.docker.yaml")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("Load docker config failed: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg.OutboxWorker.PublishMode != OutboxPublishModeMQ {
|
||||||
|
t.Fatalf("docker config should publish room outbox through MQ, got %q", cfg.OutboxWorker.PublishMode)
|
||||||
|
}
|
||||||
|
if !cfg.RocketMQ.RoomOutbox.Enabled {
|
||||||
|
t.Fatalf("docker config must enable room outbox MQ")
|
||||||
|
}
|
||||||
|
if !cfg.RocketMQ.RoomOutbox.TencentIMConsumerEnabled {
|
||||||
|
t.Fatalf("docker mq room outbox must start Tencent IM bridge consumer")
|
||||||
|
}
|
||||||
|
if !cfg.TencentIM.Enabled {
|
||||||
|
t.Fatalf("Tencent IM bridge consumer requires tencent_im.enabled")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestNormalizeRejectsUnknownOutboxRetryStrategy(t *testing.T) {
|
func TestNormalizeRejectsUnknownOutboxRetryStrategy(t *testing.T) {
|
||||||
cfg := Default()
|
cfg := Default()
|
||||||
cfg.OutboxWorker.RetryStrategy = "exponential"
|
cfg.OutboxWorker.RetryStrategy = "exponential"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user