happylhb opened a new issue #685:
URL: https://github.com/apache/rocketmq-client-go/issues/685
consumer.WithConsumeFromWhere(consumer.ConsumeFromTimestamp)
但无法设置ConsumeTimestamp
通过代码来看,也没有计算最近半小时的选择
```golang
//consumer/consumer.go line:784
case ConsumeFromTimestamp:
if lastOffset == -1 {
if strings.HasPrefix(mq.Topic, internal.RetryGroupTopicPrefix) {
lastOffset, err := dc.queryMaxOffset(mq)
if err == nil {
result = lastOffset
} else {
result = -1
rlog.Warning("query max offset error",
map[string]interface{}{
rlog.LogKeyMessageQueue: mq,
rlog.LogKeyUnderlayError: err,
})
}
} else {
t, err := time.Parse("20060102150405",
dc.option.ConsumeTimestamp)
if err != nil {
result = -1
} else {
lastOffset, err :=
dc.searchOffsetByTimestamp(mq, t.Unix()*1000)
if err != nil {
result = -1
} else {
result = lastOffset
}
}
}
}
default:
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]