Skip to content

KafkaTimeoutError #1184

Closed
Closed
@hugoren

Description

@hugoren

the err:
KafkaTimeoutError: Batch for TopicPartition(topic='test', partition=0) containing 1 record(s) expired: 30 seconds have passed since batch creation plus linger time

my code:

def kafka_producer():
     producer = KafkaProducer(bootstrap_servers='{0}:{1}'.format(HOST, PORT),
                         api_version=(0, 10, 1)
                         )
   try:
       future = producer.send('test', b'hello kafka')
       producer.flush()
       record_metadata = future.get(timeout=10)
       print(record_metadata)
except KafkaError as e:
       print(e)    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions