zthreee commented on code in PR #1897:
URL: https://github.com/apache/iggy/pull/1897#discussion_r2160279171


##########
foreign/go/samples/consumer/consumer.go:
##########
@@ -138,7 +138,7 @@ func ConsumeMessages(messageStream MessageStream) error {
        }
 }
 
-func HandleMessage(messageResponse MessageResponse) error {
+func HandleMessage(messageResponse IggyMessage) error {

Review Comment:
   Lets be consistent here, if we change everywhere the `MessageResponse` to 
`IggyMessage` lets change also the param name



##########
foreign/go/e2e/tcp_test/messages_steps.go:
##########
@@ -34,25 +35,25 @@ func createDefaultMessageHeaders() 
map[iggcon.HeaderKey]iggcon.HeaderValue {
        }
 }
 
-func createDefaultMessages() []iggcon.Message {
+func createDefaultMessages() []iggcon.IggyMessage {
        headers := createDefaultMessageHeaders()
-       messages := []iggcon.Message{
-               iggcon.NewMessage([]byte(createRandomString(256)), headers),
-               iggcon.NewMessage([]byte(createRandomString(256)), headers),
+       messages := []iggcon.IggyMessage{
+               iggcon.NewIggyMessageWithHeaders(uuid.New(), 
[]byte(createRandomString(256)), headers),
+               iggcon.NewIggyMessageWithHeaders(uuid.New(), 
[]byte(createRandomString(256)), headers),
        }
 
        return messages
 }
 
-func itShouldSuccessfullyPublishMessages(streamId int, topicId int, messages 
[]iggcon.Message, client iggy.MessageStream) {
+func itShouldSuccessfullyPublishMessages(streamId int, topicId int, messages 
[]iggcon.IggyMessage, client iggy.MessageStream) {
        result, err := client.PollMessages(iggcon.FetchMessagesRequest{
                StreamId: iggcon.NewIdentifier(streamId),
                TopicId:  iggcon.NewIdentifier(topicId),
                Consumer: iggcon.Consumer{
                        Kind: iggcon.ConsumerSingle,
                        Id:   iggcon.NewIdentifier(int(createRandomUInt32())),
                },
-               PollingStrategy: iggcon.FirstPollingStrategy(),
+               PollingStrategy: iggcon.LastPollingStrategy(),

Review Comment:
   Trying to understand why the change in PollingStrategy?



##########
foreign/go/contracts/messages.go:
##########
@@ -32,10 +32,10 @@ type FetchMessagesRequest struct {
 }
 
 type FetchMessagesResponse struct {
-       PartitionId   int
+       PartitionId   uint32
        CurrentOffset uint64
-       Messages      []MessageResponse
-       MessageCount  int
+       MessageCount  uint32
+       Messages      []IggyMessage
 }
 
 type MessageResponse struct {

Review Comment:
   If we change every `MessageResponse` to `IggyMessage` is `MessageResponse` 
even needed anymore?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to