kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sreeram <sreera...@gmail.com>
Subject 'Batch Expired' exception when publishing to a kafka topic using one producer per thread.
Date Fri, 03 Mar 2017 05:02:02 GMT
Hi,

 I get 'Batch Expired' exception when I publish to a kafka topic using one
producer per thread.  However using the same producer for each thread works
perfectly fine and I do not get the exception.

 I do not  understand what was causing this 'Batch Expired' exception with
one producer per thread.

Any help will be much appreciated.

Below are config params used for Producer :----
acks=all
retries=10
batch.size=0 (got same error also with 16384)
compression.type=snappy
key serializer = String serializer
value serializer = String serializer

All other params are left at the defaults.

Below is 'Batch Expired' Exception that came with one producer per thread
:---

Mar  1 13:04:32 d-devrta-rc-4c614a024c1c07c374e2fb40149eebb6-phs3u
drta_app: ERROR http-nio2-8180-exec-1 KafkaServiceImpl.publishData -
Exception occurred in publishData
{}#012java.util.concurrent.ExecutionException:
org.apache.kafka.common.errors.TimeoutException: Batch Expired#012#011at
org.apache.kafka.clients.producer.internals.FutureRecordMetadata.
valueOrError(FutureRecordMetadata.java:56)#012#011at
org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(
FutureRecordMetadata.java:43)#012#011at org.apache.kafka.clients.
producer.internals.FutureRecordMetadata.get(FutureRecordMetadata.java:25)#
012#011at

Thanks,
Sreeram

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message