Re: KafkaProducer partitionsFor v/s KafkaAdminClient describeTopics

2025-06-11 Thread Brebner, Paul
doc/org/apache/kafka/clients/consumer/KafkaConsumer.html#partitionsFor(java.lang.String) Regards, Paul Brebner From: Subra I Date: Wednesday, 11 June 2025 at 12:42 am To: us...@kafka.apache.org , dev@kafka.apache.org Subject: KafkaProducer partitionsFor v/s KafkaAdminClient describeTop

Re: KafkaProducer partitionsFor v/s KafkaAdminClient describeTopics

2025-06-11 Thread Subra I
Thanks for the response Ziming. In our case, we have a requirement that some users may have kafka setup where they can only produce and consume. But not be able to invoke the admin client. Hence we are going for the use of partitionsFor API in kafka producer and consumer. On Wed, Jun 11, 2025 at

Re: KafkaProducer partitionsFor v/s KafkaAdminClient describeTopics

2025-06-10 Thread ziming deng
Hi Anand, AdminClient is more recommended to get cluster/broker/topic/partition/replication metadata and these apis are under evolving , KafkaProducer is mostly used to produce record and less used to query metadata information. Ziming > On Jun 10, 2025, at 10:33 PM, Subra I wrote: > > Hi A

KafkaProducer partitionsFor v/s KafkaAdminClient describeTopics

2025-06-10 Thread Subra I
Hi All, I need to know the number of partitions for a topic before producing/consuming. Some users may set the number of partitions for a given topic but some users may just set the number of partitions in server.properties. It should work for both cases. Which method is better for a production g