shibd commented on issue #18616:
URL: https://github.com/apache/pulsar/issues/18616#issuecomment-1501882347

   > @BewareMyPower : serializing and deserializing is expensive and on top of 
that having different APIs for different use cases is creating a really bad 
experience for users, and I strongly feel we should avoid such APIs and 
complexity if things can be solved with a simple straight forward change with 
the same API and without creating the bad user experience. I think we should 
consider this simple change without costing performance and API incompatibility 
and confusing usage to the users. so, we should go with this obvious and 
straightforward change PR: #19944 as a lot of configurations and APIs are a 
huge pain point for Pulsar users already and I want to avoid doing it more and 
more in the Pulsar community.
   
   
   I think it is necessary to introduce `TopicMessageId` interface.
   
   If users know `topicName`, `ledgerId`, `entryId` and `partitionIndex` and if 
he would create MessageId to use acknowledge, It can be constructed in the 
following way:
   
   ```java
   MessageId topicMsgId = TopicMessageId.create(topicName, 
   
         
DefaultImplementation.getDefaultImplementation().newMessageId(ledgerId, 
entryId, partitionIndex));
   
   consumer.acknowledge(topicMsgId);
   ```
   
   Without `TopicMessageId` interface, I'm not sure there is another way to 
construct it?


-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to