You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Sönke Liebau (JIRA)" <ji...@apache.org> on 2017/11/16 09:11:00 UTC

[jira] [Issue Comment Deleted] (KAFKA-4) Confusing Error mesage from producer when no kafka brokers are available

     [ https://issues.apache.org/jira/browse/KAFKA-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sönke Liebau updated KAFKA-4:
-----------------------------
    Comment: was deleted

(was: Better error message introduced by fix for KAFKA-5179)

> Confusing Error mesage from producer when no kafka brokers are available
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-4
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Priority: Minor
>             Fix For: 0.11.0.0
>
>
> If no kafka brokers are available the producer gives the following error: 
> Exception in thread "main" kafka.common.InvalidPartitionException: Invalid number of partitions: 0 
> Valid values are > 0 
> at kafka.producer.Producer.kafka$producer$Producer$$getPartition(Producer.scala:144) 
> at kafka.producer.Producer$$anonfun$3.apply(Producer.scala:112) 
> at kafka.producer.Producer$$anonfun$3.apply(Producer.scala:102) 
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) 
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206) 
> at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34) 
> at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:32) 
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206) 
> at scala.collection.mutable.WrappedArray.map(WrappedArray.scala:32) 
> at kafka.producer.Producer.send(Producer.scala:102) 
> at kafka.javaapi.producer.Producer.send(Producer.scala:101) 
> at com.linkedin.nusviewer.PublishTestMessage.main(PublishTestMessage.java:45) 
> This is confusing. The problem is that no brokers are available, we should make this more clear.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)