Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

KeyError on creating duplicate topic and for invalid replication factor #805

Open
girishsv1986 opened this issue May 16, 2018 · 1 comment
Labels

Comments

@girishsv1986
Copy link

  1. When I'm trying to create topic with the same name that already exists on kafka server, kafka log shows error, org.apache.kafka.common.errors.TopicExistsException: Topic 'topic-1' already exists.
    However, pykafka ends up throwing KeyError 36, which I think is library error code to handle duplicate topic error but the exception class for same is not present in exceptions.py

Attached is the sample script, I'm trying

test_kafa_topic_creation.zip

  1. Same issue occurs, when I provide replication factor more than running fakfa instance, but this time KeyError is for 38.
    In above script, change replication factor to 2 and make sure only one fakfa instance is running.
    Kafka log message -
    org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 2 larger than available brokers: 1.

PyKafka version: 2.7.0
Kafka version:

@mellonedain
Copy link

Generally in the code (pyKafka: 2.8.0) is more missing codes. Look into documentation:
Protocol error codes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants