You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by rx...@apache.org on 2020/03/19 04:58:31 UTC

[pulsar-client-go] branch master updated: [Bug fix] Fix seek by time error (#199)

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: 冉小龙 <rx...@apache.org>
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 <rx...@apache.org>
    
    * fix comments
    
    Signed-off-by: xiaolong.ran <rx...@apache.org>
---
 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)