From b04ec667a962f19e6f01f8574597ab823c1d6d9a Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 25 Apr 2024 13:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9topic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.go | 1 + request/client.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 4e90fe0..3978daa 100644 --- a/config/config.go +++ b/config/config.go @@ -22,6 +22,7 @@ type Config struct { AccountId uint // 账号id AccessKey string // accessKey SecretKey string // secretKey + TopicPrefix string // topic前缀 RefreshTokenCallback func(token *Bearer) } diff --git a/request/client.go b/request/client.go index cec9bd5..7e5a4cc 100644 --- a/request/client.go +++ b/request/client.go @@ -228,7 +228,7 @@ func (m *Message) ack(ackAction string) error { // ExecMq @Title 调用mq func ExecMq(action string) (Message, error) { data := map[string]string{ - "topic": fmt.Sprintf("open_message_ct_%s_%s", action, config.SdkConfig.AppKey), + "topic": fmt.Sprintf("%sopen_message_ct_%s_%s", config.SdkConfig.TopicPrefix, action, config.SdkConfig.AppKey), "consumerGroupId": fmt.Sprintf("open_message_%d", config.SdkConfig.AccountId), } value := url.Values{}