RobertIndie commented on a change in pull request #12403:
URL: https://github.com/apache/pulsar/pull/12403#discussion_r747272455



##########
File path: pulsar-common/src/main/proto/PulsarApi.proto
##########
@@ -61,6 +61,9 @@ message MessageIdData {
     optional int32 batch_index = 4 [default = -1];
     repeated int64 ack_set = 5;
     optional int32 batch_size = 6;
+
+    // For the chunk message id, we need to specify the first chunk message id.
+    optional MessageIdData first_chunk_message_id = 7;

Review comment:
       > if you don't receive ack of first-chunk while publishing other chunks 
then you can't update first_chunk_message_id in rest of the chunks.
   
   The ack mentioned here is the ack from the broker and not the ack from the 
consumer, right? The `ProducerImpl-> ackReceived ` is handling the ack from the 
broker side.  And we don't need to receive ack of the first-chunk before 
publishing other chunks. We only need to process the ack(from the broker), and 
when we processing to the last chunk, the first chunk message id must be 
present. 
   
   > if chunks won't have first_chunk_message_id then when the consumer 
receives chunked-message, those chunks won't have firstChunkMessageId in the 
metadata and consumer won't be able to seek to first messageId.
   
   The producer does not send the first chunk message id to the consumer. The 
ChunkMessageId returned to the user by the consumer is generated by [getting 
the 
ChunkedMessageCtx->chunkedMessageIds](https://github.com/apache/pulsar/pull/12403/files#diff-f6e4c1c4091aa10525f331e48e66b29f22b9f7987755c1b4fb887e24f198bed6R1210-R1211).
 The Consumer does not access the `first_chunk_message_id `in the 
`MessageIdData` during this process. 
   Note that the `optional MessageIdData first_chunk_message_id = 7;` here is 
only used in the serialization and deserialization of the ChunkMessageIdImpl 
but not in the communication between the client and the broker.




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