Skip to content

CreateTopic fails with Confluent Cloud #3233

@blazerw

Description

@blazerw
Description

CreateTopic no longer works with Confluent cloud. The call returns with an EOF error. (We've found that setting the request.Version to 4 fixes the issue.

Versions

1.42.5

Sarama Kafka Go
1.42.5 4.0.x 1.23.1
Additional Context

This code change fixed it for us in ./admin.go line 260 (https://github.com/IBM/sarama/blob/main/admin.go#L260)

    if ca.conf.Version.IsAtLeast(V3_0_0_0) {
        // Version 4 is the same as version 3 (except for unknown reason)
        request.Version = 4
    } else if ca.conf.Version.IsAtLeast(V2_0_0_0) {
        // Version 3 is the same as version 2 (brokers response before throttling)
        request.Version = 3
    } else if ca.conf.Version.IsAtLeast(V0_11_0_0) {
        // Version 2 is the same as version 1 (response has ThrottleTime)
        request.Version = 2
    } else if ca.conf.Version.IsAtLeast(V0_10_2_0) {
        // Version 1 adds validateOnly.
        request.Version = 1
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions