This is an automated email from the ASF dual-hosted git repository.
rxl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git
The following commit(s) were added to refs/heads/master by this push:
new eb5d487 [Bug fix] Fix seek by time error (#199)
eb5d487 is described below
commit eb5d487ebce10aae044a5710b6bea616b035ef65
Author: 冉小龙 <[email protected]>
AuthorDate: Thu Mar 19 12:58:25 2020 +0800
[Bug fix] Fix seek by time error (#199)
* [Bug fix] Fix seek by time error
Signed-off-by: xiaolong.ran <[email protected]>
* fix comments
Signed-off-by: xiaolong.ran <[email protected]>
---
pulsar/consumer_partition.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pulsar/consumer_partition.go b/pulsar/consumer_partition.go
index 410e1ad..33fc605 100644
--- a/pulsar/consumer_partition.go
+++ b/pulsar/consumer_partition.go
@@ -334,7 +334,7 @@ func (pc *partitionConsumer) internalSeekByTime(seek
*seekByTimeRequest) {
cmdSeek := &pb.CommandSeek{
ConsumerId: proto.Uint64(pc.consumerID),
RequestId: proto.Uint64(requestID),
- MessagePublishTime:
proto.Uint64(uint64(seek.publishTime.Unix())),
+ MessagePublishTime:
proto.Uint64(uint64(seek.publishTime.UnixNano() / int64(time.Millisecond))),
}
_, err := pc.client.rpcClient.RequestOnCnx(pc.conn, requestID,
pb.BaseCommand_SEEK, cmdSeek)