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/04/10 01:56:06 UTC

[GitHub] [pulsar-client-go] hunter2046 commented on pull request #507: Expose NumPartitions() method on the producer

hunter2046 commented on pull request #507:
URL: https://github.com/apache/pulsar-client-go/pull/507#issuecomment-817052498


   > In the `MessageRouter`, you're getting a `TopicMetadata` object which will tell you the number of partitions:
   > 
   > https://github.com/apache/pulsar-client-go/blob/f17deac7ac47919aa9e46d11d33638672a24d126/pulsar/producer.go#L57
   > 
   > Wouldn't this already solve the problem?
   
   IIUC, the TopicMetadata gives us the number of partitions at the time the MessageRouter is invoked. For our use case, we need to keep recording the number of partitions when a new partition key is defined.
   
   I probably shouldn't paste the link here but DSP-28866 is the jira ticket that this change is made for.


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