Skip to content

Kafkaesque 1.0.0 not compatible with Kafka 0.10.0 #23

Description

@domige

I use following code with Kafkaesque 1.0.0 to send message to Kafka 0.10.0.

var kafka = require('kafkaesque');
var kafkaesque = kafka({
        brokers: [{ host: XX.XX.XX.XX, port: 29001 }],
                                maxBytes: 1024*1024
});

kafkaesque.produce('tip-tests-Topic', 'message form 1', function(err, res) {
                if (err) {
        console.error("Kafka saving errors: " + err);
    }
                else
                {
                                console.log('kafka sent');
                }

                console.log(JSON.stringify(res));
                console.log(JSON.stringify(err));
                kafkaesque.disconnect();
})

The Kafka server didn't receive the message.
The callback err is always true, res always null, and kafkaesque.disconnect() fail with
_groupCoordinator.tearDown();
^

TypeError: Cannot read property 'tearDown' of undefined
at Object.disconnect (C:\ReachClient\Shield\node_modules\kafkaesque\lib\kafk
aesque.js:805:24)
at C:\ReachClient\Shield\artifacts\build\lib\custom-reporters\test_kafka.js:
19:13
at C:\ReachClient\Shield\node_modules\kafkaesque\lib\kafkaesque.js:480:18
at Object.callback (C:\ReachClient\Shield\node_modules\kafkaesque\lib\kafkae
sque.js:135:27)
at Socket. (C:\ReachClient\Shield\node_modules\kafkaesque\lib\api
.js:404:17)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:529:20)

I suspect the message version change on 0.10.0 caused this? Current Kafkaesque may not able to support the v1 Kafka message?

v0

Message => Crc MagicByte Attributes Key Value

Crc => int32

MagicByte => int8

Attributes => int8

Key => bytes

Value => bytes

v1 (supported since 0.10.0)

Message => Crc MagicByte Attributes Key Value

Crc => int32

MagicByte => int8

Attributes => int8

Timestamp => int64

Key => bytes

Value => bytes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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