You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "lizhimins (via GitHub)" <gi...@apache.org> on 2023/02/28 06:21:28 UTC

[GitHub] [rocketmq] lizhimins opened a new issue, #6205: LitePullConsumer support async pull message

lizhimins opened a new issue, #6205:
URL: https://github.com/apache/rocketmq/issues/6205

   分支:develop
   
   问题:LitePullConsumer 使用 org.apache.rocketmq.client.impl.consumer.DefaultLitePullConsumerImpl#pull 从服务端获取消息。
   继续追踪,我发现 pullSyncImpl 中 CommunicationMode 是 SYNC 的,对于 DefaultPullConsumer 是同时支持同步和异步获取消息的。客户端默认配置的 org.apache.rocketmq.client.consumer.DefaultLitePullConsumer#pullThreadNums = 20,
   如果此时客户端被分配到的分区/队列数大于20,由于客户端的长轮询在服务端未返回,此时假设消息发送到了服务端没有长轮训的分区,此时消息就会延迟。
   
   建议:litePull 模式下也支持 async pull message,使用异步通信来获取消息。
   
   以上是我阅读代码发现的,具体行为是这样吗?
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] lizhimins commented on issue #6205: LitePullConsumer support async pull message

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1447675019

   Does anyone want to try


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] lizhimins closed issue #6205: LitePullConsumer support async pull message

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #6205: LitePullConsumer support async pull message
URL: https://github.com/apache/rocketmq/issues/6205


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] Abhijeetmishr commented on issue #6205: LitePullConsumer support async pull message

Posted by "Abhijeetmishr (via GitHub)" <gi...@apache.org>.
Abhijeetmishr commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1458642400

   @lizhimins @RongtongJin Can I work on this ?


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] lizhimins commented on issue #6205: LitePullConsumer support async pull message

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1480569550

   Thanks, we have three impl now. I will review them.


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] Ceilzcx commented on issue #6205: LitePullConsumer support async pull message

Posted by "Ceilzcx (via GitHub)" <gi...@apache.org>.
Ceilzcx commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1450291870

   > Does anyone want to try?
   
   I want to try. but  I don't know if I understood this correctly,  just change the value of input parameter to async for pullKernelImpl method?


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] lizhimins commented on issue #6205: LitePullConsumer support async pull message

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1451766305

   > > Does anyone want to try?
   > 
   > I want to try. but I don't know if I understood this correctly, just change the value of input parameter to async for pullKernelImpl method?
   
   This is actually a thread model problem. The implementation of synchronization is relatively simple, Each thread can use a loop to continuously obtain messages from the broker. For asynchronous pull, execute the next request in the callback of the last long poll. Please refer to the push consumer. 
   
   (click the avatar to get contact wx


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] RongtongJin commented on issue #6205: LitePullConsumer support async pull message

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1447669712

   > branch:develop
   > 
   > LitePullConsumer uses org.apache.rocketmq.client.impl.consumer.DefaultLitePullConsumerImpl#pull to get messages from the server. I found that the CommunicationMode in pullSyncImpl is SYNC. For DefaultPullConsumer, it supports both synchronous and asynchronous pull messages . In DefaultLitePullConsumer#pullThreadNums = 20 for client default configuration, and if the number of partitions/queues assigned to the client is greater than 20 at this time, since the client's long polling has not been returned by the server, it is assumed that the message is sent to a partition without long polling on the server, and the message will be delayed at this time.
   > 
   > suggest:LitePullConsumer support async pull message, using asynchronous communication to get messages.
   > 
   > The above is what I found after reading the code. Is this the behavior correct?
   
   Good catch! Could you subbmit a pull request to fix the issue?


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] buptxxb65 commented on issue #6205: LitePullConsumer support async pull message

Posted by "buptxxb65 (via GitHub)" <gi...@apache.org>.
buptxxb65 commented on issue #6205:
URL: https://github.com/apache/rocketmq/issues/6205#issuecomment-1476724734

   @lizhimins @RongtongJin 
   
   Hi! I tried to implement this feature based on my understanding and made a [PR](https://github.com/apache/rocketmq/pull/6417). I would very appreciate it if you can give me some advice.
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org