You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/03/17 10:16:04 UTC

[GitHub] [rocketmq] xujianhai666 opened a new issue #1863: confused msgId and unique_key of message

xujianhai666 opened a new issue #1863: confused msgId and unique_key of message
URL: https://github.com/apache/rocketmq/issues/1863
 
 
   **BUG REPORT**
   
   1. 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)
   
   2. Please tell us about your environment:
   
   3. 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
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] xujianhai666 commented on issue #1863: confused msgId and unique_key of message

Posted by GitBox <gi...@apache.org>.
xujianhai666 commented on issue #1863: confused msgId and unique_key of message
URL: https://github.com/apache/rocketmq/issues/1863#issuecomment-599989329
 
 
   maybe should rename msgId of producer to uniqueKey to reduce Inconsistent field

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] 2259289435 commented on issue #1863: confused msgId and unique_key of message

Posted by GitBox <gi...@apache.org>.
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,这个当成规则记下来
   
   
   
   2259289435@qq.com
    
   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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] wlliqipeng removed a comment on issue #1863: confused msgId and unique_key of message

Posted by GitBox <gi...@apache.org>.
wlliqipeng removed a comment on issue #1863: confused msgId and unique_key of message
URL: https://github.com/apache/rocketmq/issues/1863#issuecomment-600965029
 
 
   @xujianhai666 At present, msgId is likely to cause confusion. If you want to modify it, you need to consider forward compatibility. @ShannonDing @duhenglucky @RongtongJin What do you think?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] xujianhai666 edited a comment on issue #1863: confused msgId and unique_key of message

Posted by GitBox <gi...@apache.org>.
xujianhai666 edited a comment on issue #1863: confused msgId and unique_key of message
URL: https://github.com/apache/rocketmq/issues/1863#issuecomment-599989329
 
 
   maybe should rename msgId of consumer to uniqueKey to reduce Inconsistent field

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] wlliqipeng commented on issue #1863: confused msgId and unique_key of message

Posted by GitBox <gi...@apache.org>.
wlliqipeng commented on issue #1863: confused msgId and unique_key of message
URL: https://github.com/apache/rocketmq/issues/1863#issuecomment-600965029
 
 
   @xujianhai666 At present, msgId is likely to cause confusion. If you want to modify it, you need to consider forward compatibility. @ShannonDing @duhenglucky @RongtongJin What do you think?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services