Comparing version 1.4.6 to 1.4.7
@@ -8,2 +8,7 @@ # Changelog | ||
## [1.4.7] - 2019-01-17 | ||
### Fixed | ||
- Rolling upgrade from 0.10 to 0.11 causes unknown magic byte errors #246 | ||
## [1.4.6] - 2018-12-03 | ||
@@ -10,0 +15,0 @@ |
{ | ||
"name": "kafkajs", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "A modern Apache Kafka client for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", |
@@ -73,2 +73,3 @@ class KafkaJSError extends Error { | ||
class KafkaJSLockTimeout extends KafkaJSTimeout {} | ||
class KafkaJSUnsupportedMagicByteInMessageSet extends KafkaJSNonRetriableError {} | ||
@@ -92,2 +93,3 @@ module.exports = { | ||
KafkaJSLockTimeout, | ||
KafkaJSUnsupportedMagicByteInMessageSet, | ||
} |
@@ -1,2 +0,6 @@ | ||
const { KafkaJSPartialMessageError, KafkaJSNonRetriableError } = require('../../errors') | ||
const { | ||
KafkaJSPartialMessageError, | ||
KafkaJSUnsupportedMagicByteInMessageSet, | ||
} = require('../../errors') | ||
const V0Decoder = require('./v0/decoder') | ||
@@ -12,3 +16,3 @@ const V1Decoder = require('./v1/decoder') | ||
default: | ||
throw new KafkaJSNonRetriableError( | ||
throw new KafkaJSUnsupportedMagicByteInMessageSet( | ||
`Unsupported MessageSet message version, magic byte: ${magicByte}` | ||
@@ -15,0 +19,0 @@ ) |
@@ -37,2 +37,9 @@ const Long = require('long') | ||
if (e.name === 'KafkaJSUnsupportedMagicByteInMessageSet') { | ||
// Received a MessageSet and a RecordBatch on the same response, the cluster is probably | ||
// upgrading the message format from 0.10 to 0.11. Stop processing this message set to | ||
// receive the full record batch on the next request | ||
break | ||
} | ||
throw e | ||
@@ -39,0 +46,0 @@ } |
486186
9122