diff --git a/src/consumer/fetchManager.js b/src/consumer/fetchManager.js index 309a0986e..21256273c 100644 --- a/src/consumer/fetchManager.js +++ b/src/consumer/fetchManager.js @@ -32,6 +32,9 @@ const createFetchManager = ({ const createFetchers = () => { const nodeIds = getNodeIds() + if (nodeIds.length === 0) { + throw new KafkaJSFetcherRebalanceError() + } const partitionAssignments = new Map() const validateShouldRebalance = () => {