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

Not found, V3_0_6_SNAPSHOT maybe this group consumer boot first #38

Open
royalrover opened this issue Aug 7, 2018 · 2 comments
Open
Assignees

Comments

@royalrover
Copy link

当 broker对fetchConsumeOffset请求返回错误信息 “Not found, V3_0_6_SNAPSHOT maybe this group consumer boot first”,rocket sdk并未做任何处理,仍是返回默认为-1的offset,直接影响新的消费组无法消费历史消息。

    long minOffset =
                    this.brokerController.getMessageStore().getMinOffsetInQuque(requestHeader.getTopic(),
                        requestHeader.getQueueId());
 
            if (minOffset <= 0
                    && !this.brokerController.getMessageStore().checkInDiskByConsumeOffset(
                        requestHeader.getTopic(), requestHeader.getQueueId(), 0)) {
                responseHeader.setOffset(0L);
                response.setCode(ResponseCode.SUCCESS);
                response.setRemark(null);
            }
            else {
                response.setCode(ResponseCode.QUERY_NOT_FOUND);
                response.setRemark("Not found, V3_0_6_SNAPSHOT maybe this group consumer boot first");
            }

通过源码可以看到如果消费组信息并没有存储在broker上则默认返回该错误。因此对于大多数并未堆积过多数量消息的情况下,可以返回offset为0.

@gxcsoccer gxcsoccer self-assigned this Nov 20, 2018
@gxcsoccer
Copy link
Contributor

@royalrover 这个可以直接 pr,还没完全明白你的意思

@geemo
Copy link

geemo commented Jun 13, 2019

目前鉴权方式有所改变,新建 topic 即使 RAM 授权了也是不能使用。。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants