Replies: 2 comments 1 reply
-
@maciej 👋🏻 thanks for getting in touch Those 'KError' codes map to the return codes that the Kafka protocol returns. So CreateTopics on sarama.Broker (although an exported name) isn't really intended for Sarama users, but is roundtripping the CreateTopics protocol message to Kafka and receiving the response in a CreateTopicsResponse struct Lines 629 to 638 in c067a7f Typically a Sarama user would be creating topics through the Admin client interface, which should return more idiomatic Go types and expose less of the internals of the client (although we have a backlog item to improve that separation in /v2 of Sarama Line 223 in c067a7f |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back to me quickly on that @dnwe ! I have missed With my question answered I'm considering the discussion closed. |
Beta Was this translation helpful? Give feedback.
-
The call to CreateTopics using
sarama.Broker
returns aTopicErrors
map containing errors on topic creation. However it does also return a quite peculiar error:Why was the API designed this way? It seems not to be idiomatic Go.
Beta Was this translation helpful? Give feedback.
All reactions