apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
21.19k stars 11.67k forks source link

msg may be null #5766

Closed xiaoyifang closed 1 year ago

xiaoyifang commented 1 year ago

https://github.com/apache/rocketmq/blob/646d04f42524636ad09364af2a67fa8ab8b6b8fa/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java#L83-L108

image

image

Oliverwqcwrw commented 1 year ago

IMO, This is just an ide check, which is not null from a business logic point of view

Please let me know if I am missing something.

xiaoyifang commented 1 year ago

if exception is throw(when lock is interrupted) , msg may still be null .

and the logic is a little complex ,I think it can be rewrite with a more readable way.