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



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -1975,6 +1982,9 @@ public void seek(Function<String, Object> function) 
throws PulsarClientException
                 ackSet.recycle();
 
                 seek = Commands.newSeek(consumerId, requestId, 
msgId.getLedgerId(), msgId.getEntryId(), ackSetArr);
+            } else if(messageId instanceof ChunkMessageIdImpl){
+                ChunkMessageIdImpl msgId = (ChunkMessageIdImpl) messageId;
+                seek = Commands.newSeek(consumerId, requestId, 
msgId.getFirstChunkMessageId().getLedgerId(), 
msgId.getFirstChunkMessageId().getEntryId(), new long[0]);

Review comment:
       As I explained 
earlier([here](https://github.com/apache/pulsar/pull/12403#discussion_r756558399)
 and 
[here](https://github.com/apache/pulsar/pull/12403#discussion_r747272455)), the 
Consumer does not depend on the first chunk message-id set by the producer. 
[Here](https://github.com/apache/pulsar/pull/12403/files#r759004547) is the 
comment to illustrate where the consumer sets the chunk message-id. Is there 
something wrong with my explanation?
   
   > `you can't give guarantee to set firstChunkMessageId in any chunk of the 
message.`
   
   Why do we need that guarantee? I think this is the key point of our 
discussion. The consumer does not rely on this guarantee. 




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