kafka-go: CreateTopics returns io.EOF

Package version: 48c37f796910d8154479aaa04ade5843ae4f55d0

Example code: https://gist.github.com/briansorahan/0e6fac07a3076a83e36d80ae55ec48d3

I’m testing CreateTopics on an existing topic, since the idempotent behavior would be very nice to have. Is it expected to get io.EOF?

got io.EOF
2018/09/24 17:11:45 creating topics: EOF
exit status 1

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

If yes ^ this seems like a really small change, and I’d like to contribute a test too.

Here are the test failures on my fork:

# github.com/briansorahan/kafka-go_test
./compression_test.go:35:11: cannot assign int to r1 (type kafka.Message) in multiple assignment
./compression_test.go:35:21: not enough arguments in call to m.CompressionCodec.Encode
        have ()
        want ([]byte, []byte)
./compression_test.go:41:11: cannot assign int to r2 (type kafka.Message) in multiple assignment
./compression_test.go:41:22: not enough arguments in call to r1.CompressionCodec.Decode
        have ()
        want ([]byte, []byte)
./compression_test.go:127:24: not enough arguments in call to msg.CompressionCodec.Encode
        have ()
        want ([]byte, []byte)
./compression_test.go:132:26: m1.Value undefined (type int has no field or method Value)
./compression_test.go:134:14: m1.Decode undefined (type int has no field or method Decode)
FAIL    github.com/briansorahan/kafka-go [build failed]

With a little guidance on how to fix them, I’d be happy to do that too.

@achille-roussel I would love to contribute a patch. Should we just check for io.EOF here and return nil?