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

[POP] Make lite pull consumer support POP mode to consume #4483

Closed cserwen closed 1 year ago

cserwen commented 2 years ago

FEATURE REQUEST

  1. Please describe the feature you are requesting.

    • Support pop mode for DefaultLitePullConsumer.
  2. Provide any additional detail on your proposed use case for this feature.

  1. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
zhouxinyu commented 2 years ago

Hi, There is no need to do that, lite pull is widely used in the streaming scenario while POP is unsuitable.

For your needs, I think the new SimpleConsumer API is more suitable and could better leverage the POP ability. Please refer to here for more information.

cserwen commented 2 years ago

Hi, There is no need to do that, lite pull is widely used in the streaming scenario while POP is unsuitable.

For your needs, I think the new SimpleConsumer API is more suitable and could better leverage the POP ability. Please refer to here for more information.

@zhouxinyu Got it. But it seems that it can only be used after 5.0. Looking forward to the 5.0 version.

ferrirW commented 2 years ago

Hi, There is no need to do that, lite pull is widely used in the streaming scenario while POP is unsuitable.

For your needs, I think the new SimpleConsumer API is more suitable and could better leverage the POP ability. Please refer to here for more information.

In our case, the user has 500 machines and needs to explicitly call the receive interface for logic processing.

Can SimpleConsumer achieve this effect, similar to pop ? @zhouxinyu

zhouxinyu commented 2 years ago

Hi, There is no need to do that, lite pull is widely used in the streaming scenario while POP is unsuitable. For your needs, I think the new SimpleConsumer API is more suitable and could better leverage the POP ability. Please refer to here for more information.

In our case, the user has 500 machines and needs to explicitly call the receive interface for logic processing.

Can SimpleConsumer achieve this effect, similar to pop ? @zhouxinyu

Partly Yes, SimpleConsumer will receive messages from a proxy, usually, it's an LB, then the proxy will pop messages from the 500 machines in a round-robin manner. It's obvious that the clients don't need to send requests to all backend servers but should improve concurrency to reduce false empty response. In the future, the proxy could long-polling from all the backend machines to reduce client pressure.

zhouxinyu commented 2 years ago

BTW, do you use the POP technology in your production environment? If yes, any feedback?

cserwen commented 2 years ago

BTW, do you use the POP technology in your production environment? If yes, any feedback?

@zhouxinyu Yes, we are already using the POP consumption function, and through some optimizations (flexible delay messages instead of level delay), it has shown a good use effect. But there is currently such a scenario that the pull consumer needs to support the POP mode.

zhouxinyu commented 2 years ago

Got it, please pay some attention to SimpleConsumer and the implementation of server-side: https://github.com/apache/rocketmq/pull/4225