jxs1211 opened a new issue, #1202:
URL: https://github.com/apache/rocketmq-client-go/issues/1202

   Hi, I want to implement a rocket scaler in KEDA, which is intended to get 
the Lag by calculating the offset in the mq, but I don't find any exported API 
in the SDK for getting maxOffset, then I find this issue #1167 ,  and I found 
this API meet our need:
   ```go
   consumer/consumer.go
   1000:func (dc *defaultConsumer) queryMaxOffset(mq *primitive.MessageQueue) 
(int64, error) {
   1001-        brokerAddr := 
dc.client.GetNameSrv().FindBrokerAddrByName(mq.BrokerName)
   1002-        if brokerAddr == "" {
   1003-                dc.client.GetNameSrv().UpdateTopicRouteInfo(mq.Topic)
   1004-                brokerAddr = 
dc.client.GetNameSrv().FindBrokerAddrByName(mq.BrokerName)
   1005-        }
   ```
   and I want to know is it ok to add API to provide a way of getting maxOffset 
for user.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to