You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Ubuntu 18.04
RocketMQ version
5.3
JDK Version
Open_JDK 1.8.0_202
Describe the Bug
PushConsumer and LitePullConsumer's consumeFromWhere configuration didn't work in follow situation:
New created topic
New created consumerGroup
There are some messages in topic's queue, which are not expired
The value of (maxOffset - 0) not over the size the broker thought is in memory.
Steps to Reproduce
Create a new Topic
Send some messages to the topic
Create a new Push/LitePull Consumer, and start to consume message from the topic created, with the consumeFromWhere default configured as ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET
We would find that the consumer didn't consume from the last offset, it would consume from the earliest offset 0.
What Did You Expect to See?
The consumer consume from the last offset or consume from the timestamp user configured.
What Did You See Instead?
The consumer consume from the earliest offset 0.
Additional Context
Root cause as follows:
When new created consumer first consume from a topic, it would compute the offset from where to pull message. Because the brokers don't have it's consume offset, so the normal offset result should be computed as the consumeFromWhere's value, ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET, ConsumeFromWhere.CONSUME_FROM_EARLIEST_OFFSET,ConsumeFromWhere.CONSUME_FROM_TIMSTAMP, etc.
In computePullFromWhereWithException function: the consumer would query offset from the brokers to check if the brokers had the consumer offset. If not, it would set the pull offset to min/max offset or the offset corresponding to the timestamp configured, as follows:
But in broker side, it the consumer start pull message for the first time, that there's no consume offset for it. If the min offset equals to 0, and the value of (max offset - min offset) is considered as in memory, the read offset would returned as 0. So the consumer would consume from 0, even it set consumeFromWhere as from last offset or from timestamp. As follows:
The text was updated successfully, but these errors were encountered:
This is a protection measure. When a broker scales out, the registered topic route might become visible to Producers first, causing some messages to be sent. If the Consumer starts consuming from the latest offset at this time, these messages would be skipped.
This is a protection measure. When a broker scales out, the registered topic route might become visible to Producers first, causing some messages to be sent. If the Consumer starts consuming from the latest offset at this time, these messages would be skipped.
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Ubuntu 18.04
RocketMQ version
5.3
JDK Version
Open_JDK 1.8.0_202
Describe the Bug
PushConsumer and LitePullConsumer's consumeFromWhere configuration didn't work in follow situation:
Steps to Reproduce
What Did You Expect to See?
The consumer consume from the last offset or consume from the timestamp user configured.
What Did You See Instead?
The consumer consume from the earliest offset 0.
Additional Context
Root cause as follows:
When new created consumer first consume from a topic, it would compute the offset from where to pull message. Because the brokers don't have it's consume offset, so the normal offset result should be computed as the consumeFromWhere's value, ConsumeFromWhere.CONSUME_FROM_LAST_OFFSET, ConsumeFromWhere.CONSUME_FROM_EARLIEST_OFFSET,ConsumeFromWhere.CONSUME_FROM_TIMSTAMP, etc.
In computePullFromWhereWithException function: the consumer would query offset from the brokers to check if the brokers had the consumer offset. If not, it would set the pull offset to min/max offset or the offset corresponding to the timestamp configured, as follows:
But in broker side, it the consumer start pull message for the first time, that there's no consume offset for it. If the min offset equals to 0, and the value of (max offset - min offset) is considered as in memory, the read offset would returned as 0. So the consumer would consume from 0, even it set consumeFromWhere as from last offset or from timestamp. As follows:
The text was updated successfully, but these errors were encountered: