# Java Clients

**URL:** https://forum.confluent.io/c/clients/java-clients/24.md

[Latest](https://forum.confluent.io/latest.md) · [Categories](https://forum.confluent.io/categories.md)

---

## [About the Java Clients category](https://forum.confluent.io/t/about-the-java-clients-category/33)

<div class="topic-metadata">

**Author:** [@rmoff](https://forum.confluent.io/u/rmoff)\
**Replies:** 0

</div>

(Replace this first paragraph with a brief description of your new category. This guidance will appear in the category selection area, so try to keep it below 200 characters.) Use the following paragraphs for a longer d…

---

## [Confluent kafka client-config not found](https://forum.confluent.io/t/confluent-kafka-client-config-not-found/8425)

<div class="topic-metadata">

**Author:** [@mirwisek](https://forum.confluent.io/u/mirwisek)\
**Replies:** 8\
**Last updated:** [9 May 2025 16:38 UTC](https://forum.confluent.io/t/confluent-kafka-client-config-not-found/8425 "2025-05-09T16:38:34Z")

</div>

I’m following the Kafka-Connect-101 (Create Confluent Managed Kafka Connectors with the Connect API) and I can’t figure out what’s wrong with the following: Command 14 at tutorial: confluent kafka client-config create …

---

## [Two consumers in the same group can\`t read different topics](https://forum.confluent.io/t/two-consumers-in-the-same-group-can-t-read-different-topics/8609)

<div class="topic-metadata">

**Author:** [@Mikhail](https://forum.confluent.io/u/Mikhail)\
**Replies:** 2\
**Last updated:** [7 March 2025 08:45 UTC](https://forum.confluent.io/t/two-consumers-in-the-same-group-can-t-read-different-topics/8609 "2025-03-07T08:45:32Z")

</div>

Hello. I have a Spring application that contains 2 different consumers(that subscribed to different topics). It looks like: consumer C1 → topic T1, consumer C2 → topic T2. Both consumers are in the same group (they have…

---

## [Large fetch response size when resuming read from partition](https://forum.confluent.io/t/large-fetch-response-size-when-resuming-read-from-partition/37375)

<div class="topic-metadata">

**Author:** [@dizider](https://forum.confluent.io/u/dizider)\
**Replies:** 2\
**Last updated:** [2 March 2025 12:54 UTC](https://forum.confluent.io/t/large-fetch-response-size-when-resuming-read-from-partition/37375 "2025-03-02T12:54:16Z")

</div>

Hi, I’ve Kafka consumer with maximum fetch size per partition (max.partition.fetch.bytes ) set to 5MB. Fetches respect this until the first pause and resume consuming from partition. This cause the fetch request size to…

---

## [Setting group.instance.id in a spring boot application](https://forum.confluent.io/t/setting-group-instance-id-in-a-spring-boot-application/37136)

<div class="topic-metadata">

**Author:** [@scot.mcphee](https://forum.confluent.io/u/scot.mcphee)\
**Replies:** 0\
**Last updated:** [7 February 2025 07:31 UTC](https://forum.confluent.io/t/setting-group-instance-id-in-a-spring-boot-application/37136 "2025-02-07T07:31:21Z")

</div>

Hi, We have a spring boot application, which runs as multiple Deployment pods in a Kubernetes container. This application use Kafka Java Streams to process its data. I’ve observed that during a deployment of a new vers…

---

## [Issue at consumer batch poll](https://forum.confluent.io/t/issue-at-consumer-batch-poll/35403)

<div class="topic-metadata">

**Author:** [@SaiKrishnaNeeli](https://forum.confluent.io/u/SaiKrishnaNeeli)\
**Replies:** 3\
**Last updated:** [27 January 2025 14:45 UTC](https://forum.confluent.io/t/issue-at-consumer-batch-poll/35403 "2025-01-27T14:45:05Z")

</div>

Hi All, We are facing an issue with the Kafka consumer poll behavior in our application. We have configured max.poll.records to 3000 and implemented logic such that if the number of polled records is greater than or equ…

---

## [Timestamp-interceptor dependencies (jetty server)](https://forum.confluent.io/t/timestamp-interceptor-dependencies-jetty-server/13442)

<div class="topic-metadata">

**Author:** [@guillaumem-theodo](https://forum.confluent.io/u/guillaumem-theodo)\
**Replies:** 0\
**Last updated:** [3 December 2024 16:37 UTC](https://forum.confluent.io/t/timestamp-interceptor-dependencies-jetty-server/13442 "2024-12-03T16:37:49Z")

</div>

Using timestamp-interceptor version 7.7.1, 7.7.2 or latest 7.8.0, we can see transitive dependencies toward JETTY server (http server). Transitive dependencies come from: io.confluent:internal-rest-server io.conflu…

---

## [Kafka consumer polls return empty results even with long timeouts](https://forum.confluent.io/t/kafka-consumer-polls-return-empty-results-even-with-long-timeouts/11310)

<div class="topic-metadata">

**Author:** [@himanshu1](https://forum.confluent.io/u/himanshu1)\
**Replies:** 2\
**Last updated:** [26 August 2024 18:28 UTC](https://forum.confluent.io/t/kafka-consumer-polls-return-empty-results-even-with-long-timeouts/11310 "2024-08-26T18:28:28Z")

</div>

Hi! I am querying a kafka topic with a newly created consumer group. I chose the following props: properties.put(ConsumerConfig.KEY\_DESERIALIZER\_CLASS\_CONFIG, StringDeserializer.class.getCanonicalName()); proper…

---

## [Consumer deserialization issue](https://forum.confluent.io/t/consumer-deserialization-issue/10954)

<div class="topic-metadata">

**Author:** [@onlymohan](https://forum.confluent.io/u/onlymohan)\
**Replies:** 2\
**Last updated:** [15 July 2024 21:49 UTC](https://forum.confluent.io/t/consumer-deserialization-issue/10954 "2024-07-15T21:49:55Z")

</div>

Hi, Java Consumer is failing to deserialize the message with Specific Record POJO, after Schema is evolved by the producer. What can we do to handle this situation? Producer added new optional fields, and is publishing…

---

## [Kafka-client doesn't recover automatically after timeout](https://forum.confluent.io/t/kafka-client-doesnt-recover-automatically-after-timeout/9077)

<div class="topic-metadata">

**Author:** [@agustin-tecso](https://forum.confluent.io/u/agustin-tecso)\
**Replies:** 1\
**Last updated:** [21 May 2024 01:56 UTC](https://forum.confluent.io/t/kafka-client-doesnt-recover-automatically-after-timeout/9077 "2024-05-21T01:56:59Z")

</div>

I’m working in a project that uses kafka for communication. There is a business communication associated with a payment, so I configured kafka-client with exactly-once semantic in that topic. While testing my applicatio…

---

## [Java client for confluent community broker](https://forum.confluent.io/t/java-client-for-confluent-community-broker/10605)

<div class="topic-metadata">

**Author:** [@imohiuddin1](https://forum.confluent.io/u/imohiuddin1)\
**Replies:** 3\
**Last updated:** [3 May 2024 14:43 UTC](https://forum.confluent.io/t/java-client-for-confluent-community-broker/10605 "2024-05-03T14:43:34Z")

</div>

I have installed confluent community edition on my azure vm. I am able to start zookeeper and start broker and created a test topic. https://docs.confluent.io/platform/current/installation/installing\_cp/zip-tar.html?\_gl…

---

## [Spikes in record-queue-time-max on kafka producer](https://forum.confluent.io/t/spikes-in-record-queue-time-max-on-kafka-producer/10559)

<div class="topic-metadata">

**Author:** [@vick4523zf](https://forum.confluent.io/u/vick4523zf)\
**Replies:** 0\
**Last updated:** [23 April 2024 18:00 UTC](https://forum.confluent.io/t/spikes-in-record-queue-time-max-on-kafka-producer/10559 "2024-04-23T18:00:54Z")

</div>

Hi Team, I use the kafka java client library to produce and consume. I randomly see spikes of a high record queue time even though my request-latency is quite low in the milliseconds. This happens with or without compre…

---

## [Integrating Kafka Client Libraries in Android and Android TV Apps](https://forum.confluent.io/t/integrating-kafka-client-libraries-in-android-and-android-tv-apps/10320)

<div class="topic-metadata">

**Author:** [@SBS](https://forum.confluent.io/u/SBS)\
**Replies:** 1\
**Last updated:** [8 March 2024 12:55 UTC](https://forum.confluent.io/t/integrating-kafka-client-libraries-in-android-and-android-tv-apps/10320 "2024-03-08T12:55:39Z")

</div>

Hello Community, I’m exploring the feasibility and best practices for integrating Apache Kafka client libraries into applications running on Android and Android TV. I’m curious about a few key points: Feasibility: Is i…

---

## [Replica-placement for topic creation in Java](https://forum.confluent.io/t/replica-placement-for-topic-creation-in-java/3390)

<div class="topic-metadata">

**Author:** [@spartanbaz](https://forum.confluent.io/u/spartanbaz)\
**Replies:** 3\
**Last updated:** [30 January 2024 13:47 UTC](https://forum.confluent.io/t/replica-placement-for-topic-creation-in-java/3390 "2024-01-30T13:47:57Z")

</div>

Can anyone give an example of how the config should look when specifying replica-placement when creating a topic using Java? I can only find cli examples of this being used. I have tried adding it as a config item the …

---

## [Confluent kafka cli error](https://forum.confluent.io/t/confluent-kafka-cli-error/9663)

<div class="topic-metadata">

**Author:** [@Agaff](https://forum.confluent.io/u/Agaff)\
**Replies:** 5\
**Last updated:** [26 December 2023 13:22 UTC](https://forum.confluent.io/t/confluent-kafka-cli-error/9663 "2023-12-26T13:22:43Z")

</div>

Following command when I executed $confluent kafka client-config create java --schema-registry-api-key my-sr-key --schema-registry-api-secret my-sr-secret it gives a error saying unkonwn flag : --schema-registry-api-ke…

---

## [org.apache.kafka.common.errors.TimeoutException: Expiring 9 record(s) for \<\<topicname\>\>-0:300001 ms has passed since batch creation](https://forum.confluent.io/t/org-apache-kafka-common-errors-timeoutexception-expiring-9-record-s-for-topicname-0-300001-ms-has-passed-since-batch-creation/9245)

<div class="topic-metadata">

**Author:** [@madhavlonari](https://forum.confluent.io/u/madhavlonari)\
**Replies:** 0\
**Last updated:** [3 December 2023 16:58 UTC](https://forum.confluent.io/t/org-apache-kafka-common-errors-timeoutexception-expiring-9-record-s-for-topicname-0-300001-ms-has-passed-since-batch-creation/9245 "2023-12-03T16:58:05Z")

</div>

Hi I am getting below error very frequently when high number of messages are being produced to topic. This works fine in normal scenario, org.apache.kafka.common.errors.TimeoutException: Expiring 9 record(s) for \<\>-0:…

---

## [Consumer polling and partitions](https://forum.confluent.io/t/consumer-polling-and-partitions/8841)

<div class="topic-metadata">

**Author:** [@Tomas](https://forum.confluent.io/u/Tomas)\
**Replies:** 0\
**Last updated:** [9 October 2023 11:13 UTC](https://forum.confluent.io/t/consumer-polling-and-partitions/8841 "2023-10-09T11:13:23Z")

</div>

Hi. I have a question regarding polling from different partitions by a single consumer. Let’s assume a consumer is assigned to partitions A and B. Partitions A is full of data. For example: A: B: \[Y\]\[Y\] Let’s assum…

---

## [Where to update Advertised listeners](https://forum.confluent.io/t/where-to-update-advertised-listeners/8778)

<div class="topic-metadata">

**Author:** [@scanand](https://forum.confluent.io/u/scanand)\
**Replies:** 0\
**Last updated:** [26 September 2023 15:12 UTC](https://forum.confluent.io/t/where-to-update-advertised-listeners/8778 "2023-09-26T15:12:07Z")

</div>

I am newbie to kafka and following tutorial Spring for Apache Kafka® 101: Receiving Messages with KafkaListener Using Spring boot client, and configured KafkaTemplate, created ‘hobbit’ topic in cloud. Configured apike…

---

## [100 Days of Code with Apache Kafka](https://forum.confluent.io/t/100-days-of-code-with-apache-kafka/8589)

<div class="topic-metadata">

**Author:** [@Potnuru](https://forum.confluent.io/u/Potnuru)\
**Replies:** 1\
**Last updated:** [18 September 2023 06:15 UTC](https://forum.confluent.io/t/100-days-of-code-with-apache-kafka/8589 "2023-09-18T06:15:04Z")

</div>

I started today Day 1 activity while i was running into my local machine icant see any events. java -cp build/libs/kafka-java-getting-started-0.0.1.jar examples.ProducerExample getting-started.properties java -cp bu…

---

## [Can't access Kafka from a Java app. What may be the problem?](https://forum.confluent.io/t/cant-access-kafka-from-a-java-app-what-may-be-the-problem/8645)

<div class="topic-metadata">

**Author:** [@Nad.Chel](https://forum.confluent.io/u/Nad.Chel)\
**Replies:** 1\
**Last updated:** [18 September 2023 06:10 UTC](https://forum.confluent.io/t/cant-access-kafka-from-a-java-app-what-may-be-the-problem/8645 "2023-09-18T06:10:04Z")

</div>

I managed to successfully set up Zookeeper and Kafka servers, and CLI pub/sub operations work fine: nadchel@LAPTOP-CKP86E2O:/usr/local/kafka/bin$ ./kafka-console-producer.sh --broker-list localhost:9092 --topic test …

---

## [Kafka producer performance issue in spring boot 2.7](https://forum.confluent.io/t/kafka-producer-performance-issue-in-spring-boot-2-7/8488)

<div class="topic-metadata">

**Author:** [@deshpande.r.kedar](https://forum.confluent.io/u/deshpande.r.kedar)\
**Replies:** 1\
**Last updated:** [21 August 2023 12:01 UTC](https://forum.confluent.io/t/kafka-producer-performance-issue-in-spring-boot-2-7/8488 "2023-08-21T12:01:43Z")

</div>

Kafka producer (kafkaTemplate.send method ) takes longer time around 5 second to produce a message in topic when testing it with 90 hits per second constant load. Few request (180 requests out of 175000) to Kafka templa…

---

## [Kafka get notification from kafka](https://forum.confluent.io/t/kafka-get-notification-from-kafka/8215)

<div class="topic-metadata">

**Author:** [@razmikv](https://forum.confluent.io/u/razmikv)\
**Replies:** 0\
**Last updated:** [30 June 2023 20:13 UTC](https://forum.confluent.io/t/kafka-get-notification-from-kafka/8215 "2023-06-30T20:13:38Z")

</div>

Hi folks. I have a specific case that need to get the concrete timestamp of some consumer group disconnection from specific topic. Does Kafka provides a way to get this metadata as notification? Thanks in advance

---

## [We're seeing Class io.confluent.kafka.serializers.context.NullContextNameStrategy could not be found error intermittently](https://forum.confluent.io/t/were-seeing-class-io-confluent-kafka-serializers-context-nullcontextnamestrategy-could-not-be-found-error-intermittently/7884)

<div class="topic-metadata">

**Author:** [@SanjayPatil](https://forum.confluent.io/u/SanjayPatil)\
**Replies:** 1\
**Last updated:** [23 June 2023 03:28 UTC](https://forum.confluent.io/t/were-seeing-class-io-confluent-kafka-serializers-context-nullcontextnamestrategy-could-not-be-found-error-intermittently/7884 "2023-06-23T03:28:14Z")

</div>

We’re seeing below error when our SpringBoot producer is idle for long time. Normally the producer is able to send messages to confluent kafka successfully. However few times application failed with following error. This…

---

## [What is the least supported Apache Kafka version for Kafka-client 3.1.x](https://forum.confluent.io/t/what-is-the-least-supported-apache-kafka-version-for-kafka-client-3-1-x/7684)

<div class="topic-metadata">

**Author:** [@sameerconfluent](https://forum.confluent.io/u/sameerconfluent)\
**Replies:** 3\
**Last updated:** [17 May 2023 05:51 UTC](https://forum.confluent.io/t/what-is-the-least-supported-apache-kafka-version-for-kafka-client-3-1-x/7684 "2023-05-17T05:51:18Z")

</div>

What is the least supported Apache Kafka version for Kafka-client 3.1.x Below is the list of Kafka-client version We just want to know what is corresponding Kafka version that needs to be upgraded to support Kafka-clien…

---

## [What is the correct way to determine a kafka consumer is ready using assign()?](https://forum.confluent.io/t/what-is-the-correct-way-to-determine-a-kafka-consumer-is-ready-using-assign/7754)

<div class="topic-metadata">

**Author:** [@debraj-manna](https://forum.confluent.io/u/debraj-manna)\
**Replies:** 0\
**Last updated:** [2 May 2023 16:54 UTC](https://forum.confluent.io/t/what-is-the-correct-way-to-determine-a-kafka-consumer-is-ready-using-assign/7754 "2023-05-02T16:54:35Z")

</div>

I have read the below discussions java - Difference between KakaConsumer.poll(timeoutMs) and KafkaConsumer.poll(Duration.ZERO) - Stack Overflow rebalancing - How to check if Kafka Consumer is ready - Stack Overflow Bu…

---

## [Kafka Consumer not consuming messages after application restart](https://forum.confluent.io/t/kafka-consumer-not-consuming-messages-after-application-restart/7662)

<div class="topic-metadata">

**Author:** [@vmaroli](https://forum.confluent.io/u/vmaroli)\
**Replies:** 0\
**Last updated:** [20 April 2023 12:23 UTC](https://forum.confluent.io/t/kafka-consumer-not-consuming-messages-after-application-restart/7662 "2023-04-20T12:23:03Z")

</div>

I have a Java application that consumer messages from a Kafka topic. Using following kafka client dependency. \<dependency\> \<groupId\>org.apache.kafka\</groupId\> \<artifactId\>kafka-clients\</artifactId\> \<version\>3…

---

## [Distribution of load when using range assignor](https://forum.confluent.io/t/distribution-of-load-when-using-range-assignor/7452)

<div class="topic-metadata">

**Author:** [@joanna](https://forum.confluent.io/u/joanna)\
**Replies:** 0\
**Last updated:** [20 March 2023 13:16 UTC](https://forum.confluent.io/t/distribution-of-load-when-using-range-assignor/7452 "2023-03-20T13:16:17Z")

</div>

I’ve got a question about the range assignor RangeAssignor (kafka 3.3.2 API) that I understand is the default now. Using the example from the doc, let’s say that there are two topics t0 and t1 each having 3 partitions p0,…

---

## [Producer network thread is leaking via DirectByteBuffer's](https://forum.confluent.io/t/producer-network-thread-is-leaking-via-directbytebuffers/7423)

<div class="topic-metadata">

**Author:** [@basimons](https://forum.confluent.io/u/basimons)\
**Replies:** 0\
**Last updated:** [15 March 2023 15:16 UTC](https://forum.confluent.io/t/producer-network-thread-is-leaking-via-directbytebuffers/7423 "2023-03-15T15:16:54Z")

</div>

Hi all, I also posted this here, but I didn’t get a response unfortunately. I have a problem. The direct memory is linearly increasing by about 500 MB/6h. It does not seem to go down. After inspecting the heapdump with …

---

## [Kafka Brokers are crashed after some (7) days](https://forum.confluent.io/t/kafka-brokers-are-crashed-after-some-7-days/7037)

<div class="topic-metadata">

**Author:** [@AbdulRahim](https://forum.confluent.io/u/AbdulRahim)\
**Replies:** 1\
**Last updated:** [7 March 2023 10:35 UTC](https://forum.confluent.io/t/kafka-brokers-are-crashed-after-some-7-days/7037 "2023-03-07T10:35:48Z")

</div>

Hi @rmoff I deploy my Kafka cluster on Linux Kubernetes before that its running on Linux Docker VM. When I migrated that cluster to K8 after some days it causes and issue. My Kubernetes Cluster is on Azure Kubernetes Se…

---

## [Interrupted while joining ioThread](https://forum.confluent.io/t/interrupted-while-joining-iothread/7184)

<div class="topic-metadata">

**Author:** [@Juan](https://forum.confluent.io/u/Juan)\
**Replies:** 0\
**Last updated:** [7 February 2023 17:37 UTC](https://forum.confluent.io/t/interrupted-while-joining-iothread/7184 "2023-02-07T17:37:27Z")

</div>

My transactional producer is randomly receiving the following exception while trying to commit a transaction, and I can’t figure out where the interrupt is coming from (certainly doesn’t seem to be from my code): Feb 04…

[Next page](https://forum.confluent.io/c/clients/java-clients/24.md?page=1)
