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{}