2259289435 commented on issue #1863: confused msgId and unique_key of message URL: https://github.com/apache/rocketmq/issues/1863#issuecomment-600424058 消费的getmsgid重写了方法,取的就是UNIQ_KEY,这个当成规则记下来 [email protected] From: xujianhai666 Date: 2020-03-17 18:17 To: apache/rocketmq CC: Subscribed Subject: [apache/rocketmq] confused msgId and unique_key of message (#1863) BUG REPORT Please describe the issue you observed: What did you do (The steps to reproduce)? I use simple producer send a message like below: SendResult [sendStatus=SEND_OK, msgId=0AFE2AEF000018B4AAC2562A9AC70000, offsetMsgId=0AE1578800002A9F0000000C6C988CC2, messageQueue=MessageQueue [topic=test_create_topic, brokerName=sandbox_boe4, queueId=0], queueOffset=0] consumer receive message like that: Receive New Messages: [MessageExt [queueId=0, storeSize=197, queueOffset=0, sysFlag=0, bornTimestamp=1584437632711, bornHost=/10.254.42.239:49872, storeTimestamp=1584437632868, storeHost=/10.225.87.136:10911, msgId=0AE1578800002A9F0000000C6C988CC2, commitLogOffset=53361544386, bodyCRC=198614610, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message{topic='test_create_topic', flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=1, KEYS=OrderID188, CONSUME_START_TIME=1584437674686, UNIQ_KEY=0AFE2AEF000018B4AAC2562A9AC70000, WAIT=true, TAGS=TagA}, body=[72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100], transactionId='null'}]] What did you expect to see? msgId of consumer should be equal to msgId of message that proucer sent What did you see instead? msgId(producer) equal to unique_key(consumer) unique key(consumer) equal to offsetMsgId(producer) Please tell us about your environment: Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc): After dig info code, producer deal with sendResult ugly, producer set msgId with self unique key, but set offsetMsgId with msgId of broker result, which caused unconsistent result above. consumer logic is right — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
