Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROCKETMQ-309] Add new consumer implement #190

Closed
wants to merge 5 commits into from

Conversation

lyy4j
Copy link

@lyy4j lyy4j commented Nov 2, 2017

When application use consume client in Broadcast model which runs in the docker,we can pull message only from fist offset, because docker allocate the apps at random and cause the store file do not reuse. However, we only want to pull message from last offset sometimes even though the apps runs in the docker, and we can use MQBroadcastFromLastConsumer in this case.

@lyy4j lyy4j changed the title Tag 20171102 add new consumer implement Nov 2, 2017
@zhouxinyu
Copy link
Member

Did you mean CONSUME_FROM_LAST_OFFSET don't take effect for the broadcast model?

BTW, could you please report a JIRA issue before submitting a pull request?

@lyy4j
Copy link
Author

lyy4j commented Nov 3, 2017

@zhouxinyu ,sorry I have modify my commented again .

@lyy4j
Copy link
Author

lyy4j commented Nov 3, 2017

I have report JIRA ISSUE(309), would you have check ? @zhouxinyu

@zhouxinyu zhouxinyu changed the title add new consumer implement [ROCKETMQ-309] Add new consumer implement Nov 3, 2017
@zhouxinyu zhouxinyu changed the base branch from master to develop November 3, 2017 02:52
@zhouxinyu
Copy link
Member

Thanks, let's discuss in ROCKETMQ-309 first~

@lyy4j
Copy link
Author

lyy4j commented Nov 3, 2017

even if the apps do not run in the docker, it also has the problem.
for exmaple ,
the client has consume offset 3, and flush the store file , and the consumer shutdown .
in the mean while ,the broker offset has increan from 3 to 6;
when the client reboot , it only can consum offset from 3 ,but we want consum offset 6 only.

@lyy4j
Copy link
Author

lyy4j commented Nov 14, 2017

what about the result of this pull request? @zhouxinyu

@zhouxinyu
Copy link
Member

Yes, It's exactly expected, CONSUME_FROM_LAST_OFFSET only take effect at the first subscription action of the consumer, you can reset the offset of stale consumers by mqadmin tool.

Consume from the last offset for each restart isn't common.

@lindzh
Copy link
Contributor

lindzh commented Mar 2, 2018

@lyy4j When using Broadcast Model , offset is stored in local. If you are using docker,please map volume offset store directory to host.

@francisoliverlee
Copy link
Member

@zhouxinyu
when CONSUME_FROM_LAST_OFFSET is set ,
for old consumers, they would use last offset when every restart, right?
for new consumers, they would use offset=0. it means new consumers will consume all messages the broker have got since it start, am i right?

@vsair
Copy link
Contributor

vsair commented Jun 8, 2018 via email

@vongosling vongosling closed this Jul 14, 2018
lizhanhui pushed a commit to lizhanhui/rocketmq that referenced this pull request Dec 10, 2020
1) HA ScheduleMessage deliver two times, timer cancel() can't terminate running task.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants