You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Sreeram <sr...@gmail.com> on 2017/03/03 05:02:02 UTC
'Batch Expired' exception when publishing to a kafka topic using one
producer per thread.
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