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/06/04 03:55:25 UTC

[GitHub] [rocketmq-externals] Kcaco01 opened a new issue #572: Failed to query message by Id

Kcaco01 opened a new issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572


   Please describe the issue you observed:
   What did you do (The steps to reproduce)?
   when i wang to query message by rocketmq console
   
   What did you expect to see?
   message detail
   
   What did you see instead?
   org.apache.rocketmq.console.exception.ServiceException: Failed to query message by Id
   
   Please tell us about your environment:
   client: rocketmq-spring-boot-starter-2.1.0
   nameserver and broker: 4.7.0
   
   Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   request: http://xxx.xxx.xxx.xxx:8484/message/viewMessage.query?msgId=FE80000000000000B6C3D6E943DA7B1D000018B4AAC211DF987A0004&topic=yxm_order_topic
   response: {"status":-1,"data":null,"errMsg":"Failed to query message by Id: FE80000000000000B6C3D6E943DA7B1D000018B4AAC211DF987A0004"}
   


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



[GitHub] [rocketmq-externals] Kcaco01 commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
Kcaco01 commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-640695003


   > 这个其实是rocketmq项目出现的问题,因为在消息内容转换成MessageView的时候,MessageExt的实际实现类是org.apache.rocketmq.common.message.MessageClientExt。代码点:org.apache.rocketmq.console.model.MessageView#fromMessageExt
   > ![image](https://user-images.githubusercontent.com/8580606/83858328-e89b4900-a74e-11ea-8419-bd284eb7f15d.png)
   > 但是MessageExt是把getMsgId重写了的,代码如下:
   > ![image](https://user-images.githubusercontent.com/8580606/83858428-0ff21600-a74f-11ea-9b8a-b63be558ec42.png)
   > 通常情况下,消息会有两个id,一个getOffsetMsgId(就是我们通常意义上说的在broker生成的唯一id),一个则是在producer端生成的唯一id( 存储在 property中键为UNIQ_KEY的值)
   > 实际上我们一直用的其实是offsetMsgId,我们在broker通过消息id查也是通过这个查询的。这里转换等于直接把一个我们不需要的id转换提供到前端去了。
   > 
   > 解决办法有两个,一个是在上述rocketmq-console的类转换处,手工set一下把id改掉,一个是在rocketmq-common项目处更改MessageClientExt的getMsgId方法(目前看不出这个额外类存在的必要)
   
   你好,感谢回答。这边你有测试过吗。我这边测试好像不行啊,我这边debug好像是在调用查询接口的时候出错了。如图:
   <img width="1111" alt="1" src="https://user-images.githubusercontent.com/48859849/84047497-ebf83400-a9dd-11ea-8770-76e278c333c8.png">
   
   


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



[GitHub] [rocketmq-externals] zhoufanshou commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
zhoufanshou commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-642548687


   > 用master JDK1.7
   
   现在用的master JDK1.8,请问你遇到过同样的问题吗


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



[GitHub] [rocketmq-externals] liliangzjy commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
liliangzjy commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-642521400


   用master  JDK1.7   
   


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



[GitHub] [rocketmq-externals] fibbery commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
fibbery commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-641012091


   > > 这个其实是rocketmq项目出现的问题,因为在消息内容转换成MessageView的时候,MessageExt的实际实现类是org.apache.rocketmq.common.message.MessageClientExt。代码点:org.apache.rocketmq.console.model.MessageView#fromMessageExt
   > > ![image](https://user-images.githubusercontent.com/8580606/83858328-e89b4900-a74e-11ea-8419-bd284eb7f15d.png)
   > > 但是MessageExt是把getMsgId重写了的,代码如下:
   > > ![image](https://user-images.githubusercontent.com/8580606/83858428-0ff21600-a74f-11ea-9b8a-b63be558ec42.png)
   > > 通常情况下,消息会有两个id,一个getOffsetMsgId(就是我们通常意义上说的在broker生成的唯一id),一个则是在producer端生成的唯一id( 存储在 property中键为UNIQ_KEY的值)
   > > 实际上我们一直用的其实是offsetMsgId,我们在broker通过消息id查也是通过这个查询的。这里转换等于直接把一个我们不需要的id转换提供到前端去了。
   > > 解决办法有两个,一个是在上述rocketmq-console的类转换处,手工set一下把id改掉,一个是在rocketmq-common项目处更改MessageClientExt的getMsgId方法(目前看不出这个额外类存在的必要)
   > 
   > 你好,感谢回答。这边你有测试过吗。我这边测试好像不行啊,我这边debug好像是在调用查询接口的时候出错了。如图:
   > <img alt="1" width="1111" src="https://user-images.githubusercontent.com/48859849/84047497-ebf83400-a9dd-11ea-8770-76e278c333c8.png">
   
   调查询接口出错是因为传入的消息id不对,这个存在的问题是,查询消息返回的那个消息id不是真正意义上的消息id,你需要拿的是实际上messageext里面的msgId,而不是unique_key的值
   你在view_message这一步已经算是有错了,因为这个消息的消息id根本不对。
   你可以根据楼上说的,用mq admin 的 queryMsgById对两个id进行测试就知道了


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



[GitHub] [rocketmq-externals] vongosling closed issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
vongosling closed issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572


   


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



[GitHub] [rocketmq-externals] zhoufanshou commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
zhoufanshou commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-642372096


   rocketmq-concosle-ng-1.0.1版本MessageExt没有重写这个msgId,也报了这个错;
   而且诡异的是最近的可以正常显示,时间比较久的无法显示


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



[GitHub] [rocketmq-externals] vongosling commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
vongosling commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-664744976


   Thanks for your report. We are upgrading the to the latest spring-boot. You could use the latest code https://github.com/apache/rocketmq-externals/pull/600. Any question, please feel free to let us know.


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



[GitHub] [rocketmq-externals] fibbery commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
fibbery commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-639359374


   这个其实是rocketmq项目出现的问题,因为在消息内容转换成MessageView的时候,MessageExt的实际实现类是org.apache.rocketmq.common.message.MessageClientExt。代码点:org.apache.rocketmq.console.model.MessageView#fromMessageExt
   ![image](https://user-images.githubusercontent.com/8580606/83858328-e89b4900-a74e-11ea-8419-bd284eb7f15d.png)
   但是MessageExt是把getMsgId重写了的,代码如下:
   ![image](https://user-images.githubusercontent.com/8580606/83858428-0ff21600-a74f-11ea-9b8a-b63be558ec42.png)
   通常情况下,消息会有两个id,一个getOffsetMsgId(就是我们通常意义上说的在broker生成的唯一id),一个则是在producer端生成的唯一id( 存储在 property中键为UNIQ_KEY的值)
   实际上我们一直用的其实是offsetMsgId,我们在broker通过消息id查也是通过这个查询的。这里转换等于直接把一个我们不需要的id转换提供到前端去了。
   
   解决办法有两个,一个是在上述rocketmq-console的类转换处,手工set一下把id改掉,一个是在rocketmq-common项目处更改MessageClientExt的getMsgId方法(目前看不出这个额外类存在的必要)
   


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



[GitHub] [rocketmq-externals] duhenglucky commented on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-640989599


   @Kcaco01 建议使用MQ admin tools查一下,看下是不是有上述问题。


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



[GitHub] [rocketmq-externals] vongosling edited a comment on issue #572: Failed to query message by Id

Posted by GitBox <gi...@apache.org>.
vongosling edited a comment on issue #572:
URL: https://github.com/apache/rocketmq-externals/issues/572#issuecomment-664744976


   Thanks for your report. We are upgrading to the latest spring-boot. You could use the latest code https://github.com/apache/rocketmq-externals/pull/600. Any question, please feel free to let us know.


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