jcq消费消息

This commit is contained in:
苏尹岚
2020-07-15 15:18:44 +08:00
parent 584dbe8d79
commit 56995b191b
6 changed files with 242 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ import (
const (
sigKey = "signature"
httpURL = "jcq-hb-yd-001-httpsrv-nlb-FI.jvessel-open-hb.jdcloud.com:8080"
httpURL = "http://jcq-hb-yd-001-httpsrv-nlb-FI.jvessel-open-hb.jdcloud.com:8080"
TopicCreateOrder = "open_message_pop_order_create_E1D746D42474D5F1F1A10CECE75D99F6"
ConsumerGroupIdCreateOrder = "open_message_573819178445"
@@ -105,6 +105,7 @@ func (a *API) ConsumeInfo(topic, consumerGroupId string) (consumeInfoResult *Con
result, err := a.AccessAPI("v1/messages", httpURL, map[string]interface{}{
"topic": topic,
"consumerGroupId": consumerGroupId,
"size": 1,
})
if err == nil {
utils.Map2StructByJson(result, &consumeInfoResult, false)