apache / apache/rocketmq-client-go

[Feature] Provide a method to get MaxOffset/TopicStatsTable

Open
#1,167 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.4k
Forks
445
PR merge metrics
No merged PRs in 30d

Description

**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 offsetTable = new ConcurrentHashMap<>();

public Map getOffsetTable() {
return offsetTable;
}

public void setOffsetTable(Map offsetTable) {
this.offsetTable = offsetTable;
}
}
```

2. 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.

2. 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

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

None

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.