You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/01 04:08:10 UTC

[GitHub] [pulsar-client-go] yorkhellen opened a new pull request #529: add LedgerId,EntryId,BatchIdx,PartitionIdx func for MessageId interface

yorkhellen opened a new pull request #529:
URL: https://github.com/apache/pulsar-client-go/pull/529


   In some cases, consumers need to obtain the ledgerId, entryId, batchId, partitionidx of the messageId.
   
   This expose LedgerId EntryId BatchId PartitionIdx func for MessageId interface.
   


-- 
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] yorkhellen commented on a change in pull request #529: add LedgerId,EntryId,BatchIdx,PartitionIdx func for MessageId interface

Posted by GitBox <gi...@apache.org>.
yorkhellen commented on a change in pull request #529:
URL: https://github.com/apache/pulsar-client-go/pull/529#discussion_r642769922



##########
File path: pulsar/impl_message_test.go
##########
@@ -36,6 +35,11 @@ func TestMessageId(t *testing.T) {
 	assert.Equal(t, int32(3), id2.(messageID).batchIdx)
 	assert.Equal(t, int32(4), id2.(messageID).partitionIdx)
 
+	assert.Equal(t, int64(1), id2.LedgerId())
+	assert.Equal(t, int64(2), id2.EntryId())
+	assert.Equal(t, int32(3), id2.BatchIdx())
+	assert.Equal(t, int32(4), id2.PartitionIdx())
+

Review comment:
       ok.




-- 
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy merged pull request #529: add LedgerId,EntryId,BatchIdx,PartitionIdx func for MessageId interface

Posted by GitBox <gi...@apache.org>.
wolfstudy merged pull request #529:
URL: https://github.com/apache/pulsar-client-go/pull/529


   


-- 
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #529: add LedgerId,EntryId,BatchIdx,PartitionIdx func for MessageId interface

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on a change in pull request #529:
URL: https://github.com/apache/pulsar-client-go/pull/529#discussion_r642769801



##########
File path: pulsar/impl_message_test.go
##########
@@ -18,9 +18,8 @@
 package pulsar
 
 import (
-	"testing"
-
 	"github.com/stretchr/testify/assert"
+	"testing"

Review comment:
       Here go's ci check should fail, please make sure that Action CI is passable




-- 
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #529: add LedgerId,EntryId,BatchIdx,PartitionIdx func for MessageId interface

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on a change in pull request #529:
URL: https://github.com/apache/pulsar-client-go/pull/529#discussion_r642768963



##########
File path: pulsar/impl_message_test.go
##########
@@ -36,6 +35,11 @@ func TestMessageId(t *testing.T) {
 	assert.Equal(t, int32(3), id2.(messageID).batchIdx)
 	assert.Equal(t, int32(4), id2.(messageID).partitionIdx)
 
+	assert.Equal(t, int64(1), id2.LedgerId())
+	assert.Equal(t, int64(2), id2.EntryId())
+	assert.Equal(t, int32(3), id2.BatchIdx())
+	assert.Equal(t, int32(4), id2.PartitionIdx())
+

Review comment:
       Please do not cover the current function in the original test case. Can you add a new test case to cover this feature?




-- 
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:
users@infra.apache.org