confluent-kafka-go icon indicating copy to clipboard operation
confluent-kafka-go copied to clipboard

[AdminAPI] Kafka createTopics returns nil error even if it can't create topic.

Open Utkagr opened this issue 5 years ago • 1 comments

Description

Hi,

I am trying to create a kafkatopic with this config using AdminAPI createTopics function.

{
"name": "user:created",
"numberOfPartitions": 3,
"replicationFactor" : 2
}

The topic is not getting created since kafka doesn't support anything other than "[a-zA-Z0-9\\._\\-]" but the error returned from the createTopics function shouldn't be nil.

Has anyone faced similar issue before?

I'm following the example at https://github.com/confluentinc/confluent-kafka-go/blob/master/examples/admin_create_topic/admin_create_topic.go

How to reproduce

Checklist

Please provide the following information:

  • [x] confluent-kafka-go and librdkafka version (LibraryVersion()): confluent-kafka-go: v1.1.0; librdkafka is installed from https://github.com/edenhill/librdkafka

  • [x] Apache Kafka broker version: 2.0

  • [ ] Client configuration: ConfigMap{...}

  • [x] Operating system: Linux/Ubuntu

  • [ ] Provide client logs (with "debug": ".." as necessary)

  • [ ] Provide broker log excerpts

  • [x] Critical issue: Yes

Utkagr avatar Feb 10 '20 06:02 Utkagr

In the latest version, this doesn't seem to be happening anymore, using the same example

$ ./admin_create_topic localhost:9092 'user:bin' 1 1
user:bin (Topic name is invalid: 'user:bin' contains one or more characters other than ASCII alphanumerics, '.', '_' and '-')```

Is this now solved for you, too?

milindl avatar Feb 28 '23 05:02 milindl

Closing this as it's been awaiting information for a while. Please reopen it if it happens in the latest version.

milindl avatar Mar 05 '24 13:03 milindl