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 2022/10/10 03:08:47 UTC

[GitHub] [rocketmq] homeguess opened a new issue, #5259: Some question about commit comsumer offe

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

   ![1665370226442](https://user-images.githubusercontent.com/20274221/194793101-16dc5c78-e35a-4b00-a3b4-85bf3920dd69.png)
   
   Client send PULL_MESSAGE request to broker .  Broker commit consumer offset before response to client . If offset has upadted . But client shut down before it get broker response . The message will lost or not ? 


-- 
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: dev-unsubscribe@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] homeguess commented on issue #5259: Some question about commit comsumer offe

Posted by GitBox <gi...@apache.org>.
homeguess commented on issue #5259:
URL: https://github.com/apache/rocketmq/issues/5259#issuecomment-1272740017

   > The offset to commit and the offset to pull messages from are two different offsets. The former is calculated from each consumer ProcessQueue. The latter one is simply the next offset to pull from the previous pull result.
   
   I clarify my question use example.
   If broker commited queue QA offset 100 . Now client CA has shut down . 
   Now client CB replace clinet CA to handle queue A . It pull message from broker will start at 100 or start at 0 ?


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on issue #5259: Some question about commit comsumer offe

Posted by GitBox <gi...@apache.org>.
lizhanhui commented on issue #5259:
URL: https://github.com/apache/rocketmq/issues/5259#issuecomment-1272735154

   I would close this issue as the response should have clarified your doubt.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on issue #5259: Some question about commit comsumer offset

Posted by GitBox <gi...@apache.org>.
lizhanhui commented on issue #5259:
URL: https://github.com/apache/rocketmq/issues/5259#issuecomment-1272746882

   Assume Client CA is now in charge of queue QA, with next-pull-offset 100 and commit-offset 80. When CA pulls messages, it requests somewhat like `{queueOffset=100, commitOffset=80, ...}`
   
   When the broker receives this request, it may update consume offset to 80 if 80 is greater than the previously existing value and start to deliver messages starting from 100.
   
   Now CA crashes and CB picks up, it would first inquire the broker where to start to consume messages...the broker says 80, and CB would start to pull messages from 80 and forward. 
   
   This is how at-least-once semantics is guaranteed. 
   
   If you are critical enough, you would be aware that messages between (80, 100] may be fed to applications more than once. 


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on issue #5259: Some question about commit comsumer offe

Posted by GitBox <gi...@apache.org>.
lizhanhui commented on issue #5259:
URL: https://github.com/apache/rocketmq/issues/5259#issuecomment-1272734777

   The offset to commit and the offset to pull messages from are two different offsets. The former is calculated from each consumer ProcessQueue. The latter one is simply the next offset to pull from the previous pull result.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui closed issue #5259: Some question about commit comsumer offe

Posted by GitBox <gi...@apache.org>.
lizhanhui closed issue #5259: Some question about commit comsumer offe
URL: https://github.com/apache/rocketmq/issues/5259


-- 
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: dev-unsubscribe@rocketmq.apache.org

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