Skip to content

Invalid Topic names not handled #27

@jhedev

Description

@jhedev

If I try to use an invalid topic name, I get a KafkaDeserializationError.

Error code 17 is documented as "InvalidTopicName" here: https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-ErrorCodes

Took me a while to figure out what I am doing wrong. So it would be great if this error could be handled in order to provide a better error message.

Example:

λ> :set -XOverloadedStrings
λ> let k = mkKafkaState "foo" ("192.168.99.100", 9092)
λ> runKafka k $ produceMessages [TopicAndMessage "\"foo" (makeMessage "msg")]
Left (KafkaDeserializationError "Failed reading: invalid error code: 17\nEmpty call stack\n")

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