Skip to content

Commit

Permalink
use 'buffer' for default JS Kafka encoding
Browse files Browse the repository at this point in the history
this makes the messages consumed by the JS Kafka Client match the
native librdkafka backend and create buffers for the key and value

this also makes the JS Kafka client match the documentation.
  • Loading branch information
imnotjames committed Jun 12, 2018
1 parent afddba8 commit 5d28f54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/kafka/Kafka.js
Expand Up @@ -180,7 +180,9 @@ class Kafka extends EventEmitter {
fetchMaxWaitMs: 100,
autoCommit: autoCommit,
autoCommitIntervalMs: 5000,
connectRetryOptions: this.connectDirectlyToBroker ? DEFAULT_RETRY_OPTIONS : undefined
connectRetryOptions: this.connectDirectlyToBroker ? DEFAULT_RETRY_OPTIONS : undefined,
encoding: "buffer",
keyEncoding: "buffer"
};

//overwrite default options
Expand Down

0 comments on commit 5d28f54

Please sign in to comment.