SOHU-Co / kafka-node

Node.js client for Apache Kafka 0.8 and later.
MIT License
2.66k stars 628 forks source link

Partitioning problem occurs when there are letters in partition key. #791

Open MykytaLiashenko opened 6 years ago

MykytaLiashenko commented 6 years ago

Questions?

Bug Report

Environment

During development I've found an issue with partition key on message sending. I'm trying to send a message with partition key equals to uuid, but getting an error:

{ BrokerNotAvailableError    
at new BrokerNotAvailableError (~/devicehive-ws-kafka-proxy/node_modules/kafka-node/lib/errors/BrokerNotAvailableError.js:11:9)    
at refreshMetadata.error (~/devicehive-ws-kafka-proxy/node_modules/kafka-node/lib/kafkaClient.js:735:16)    
at ~/devicehive-ws-kafka-proxy/node_modules/kafka-node/lib/client.js:508:9    
at KafkaClient.wrappedFn (~/devicehive-ws-kafka-proxy/node_modules/kafka-node/lib/kafkaClient.js:374:14)    
at KafkaClient.Client.handleReceivedData (~/devicehive-ws-kafka-proxy/node_modules/kafka-node/lib/client.js:764:60)    
at Socket. (~/devicehive-ws-kafka-proxy/node_modules/kafka-node/lib/kafkaClient.js:523:10)    
at emitOne (events.js:115:13)    
at Socket.emit (events.js:210:7)   
at addChunk (_stream_readable.js:266:12)    
at readableAddChunk (_stream_readable.js:253:11) message: 'Could not find the leader' }

I've also tried to test it a bit and looks like this problem occurs when partition key has letters inside. I know that native Kafka supports this.

Could you check what the problem is?

hyperlink commented 6 years ago

Is this still happening? We have tests that cover this so it shouldn't be broken.