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/05/24 16:14:19 UTC

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #526: Add messageID from string and from parts

cckellogg commented on a change in pull request #526:
URL: https://github.com/apache/pulsar-client-go/pull/526#discussion_r638077068



##########
File path: pulsar/message.go
##########
@@ -120,19 +124,65 @@ type Message interface {
 type MessageID interface {
 	// Serialize the message id into a sequence of bytes that can be stored somewhere else
 	Serialize() []byte
+	// String the message id represented as a string
+	String() string

Review comment:
       This is not needed the struct just needs to implement the Stringer interface
   https://golang.org/pkg/fmt/#Stringer

##########
File path: pulsar/message.go
##########
@@ -120,19 +124,65 @@ type Message interface {
 type MessageID interface {
 	// Serialize the message id into a sequence of bytes that can be stored somewhere else
 	Serialize() []byte
+	// String the message id represented as a string
+	String() string
+	// Equals indicates to message IDs are equal
+	Equals(other MessageID) bool

Review comment:
       I don't think we should add this either. We should avoid changing the interfaces since it's a breaking change and this can be accomplished with out doing that. We can add a util method like `messageIDsEqual or MessageIDsEquals`.




-- 
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