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

[Feature] Provide a method to get MaxOffset/TopicStatsTable #1167

Open
dovics opened this issue Sep 19, 2024 · 0 comments
Open

[Feature] Provide a method to get MaxOffset/TopicStatsTable #1167

dovics opened this issue Sep 19, 2024 · 0 comments

Comments

@dovics
Copy link

dovics commented Sep 19, 2024

FEATURE REQUEST

  1. Please describe the feature you are requesting.

there is no way To obtain the MaxOffset of a Topic, is it possible to also provide methods such as TopicStatsTable in the Go SDK.

https://github.com/apache/rocketmq/blob/280804c5592341f92a43b6d72ec6e94db77b74ac/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/admin/TopicStatsTable.java#L24

public class TopicStatsTable extends RemotingSerializable {
    private Map<MessageQueue, TopicOffset> offsetTable = new ConcurrentHashMap<>();

    public Map<MessageQueue, TopicOffset> getOffsetTable() {
        return offsetTable;
    }

    public void setOffsetTable(Map<MessageQueue, TopicOffset> offsetTable) {
        this.offsetTable = offsetTable;
    }
}
  1. Provide any additional detail on your proposed use case for this feature.

I am developing a KEDA Scaler based on RocketMQ, which will dynamically adjust the number of Pods based on the difference between the ConsumerGroup Offset and the Topic MaxOffset. I can get the ConsumerGroup Offset through the PullConsumer.CurrentOffset method, But I also need a method to get MaxOffset.

  1. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

blocker

  1. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:

None

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

No branches or pull requests

1 participant