{"action":"opened","issue":{"url":"https://api.github.com/repos/edenhill/librdkafka/issues/877","repository_url":"https://api.github.com/repos/edenhill/librdkafka","labels_url":"https://api.github.com/repos/edenhill/librdkafka/issues/877/labels{/name}","comments_url":"https://api.github.com/repos/edenhill/librdkafka/issues/877/comments","events_url":"https://api.github.com/repos/edenhill/librdkafka/issues/877/events","html_url":"https://github.com/edenhill/librdkafka/issues/877","id":186244022,"number":877,"title":"outq_len() returns 1 for several minutes before it becomes to return 0","user":{"login":"muumu","id":5680689,"avatar_url":"https://avatars.githubusercontent.com/u/5680689?v=3","gravatar_id":"","url":"https://api.github.com/users/muumu","html_url":"https://github.com/muumu","followers_url":"https://api.github.com/users/muumu/followers","following_url":"https://api.github.com/users/muumu/following{/other_user}","gists_url":"https://api.github.com/users/muumu/gists{/gist_id}","starred_url":"https://api.github.com/users/muumu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muumu/subscriptions","organizations_url":"https://api.github.com/users/muumu/orgs","repos_url":"https://api.github.com/users/muumu/repos","events_url":"https://api.github.com/users/muumu/events{/privacy}","received_events_url":"https://api.github.com/users/muumu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-31T09:56:15Z","updated_at":"2016-10-31T09:56:15Z","closed_at":null,"body":"Description\r\n===========\r\nI am using RdKafka::Producer to post messages to my Kafka broker cluster.\r\nWhen I wait for outq_len() to be 0 after I produce 100 messages, sometimes outq_len() returns 1 for several minutes and then returns 0.\r\nI think it is strange that outq_len() returns just 1.\r\nDo you have any idea about the cause or the way to specify it?\r\nSome errors in Kafka brokers I excerpts below may be related to this issue.\r\nI am using high-level KafkaConsumer in my consumer servers and the issue solved by shutting down the consumers, so I suspect that something related to the errors between brokers and consumers might cause this issue.\r\n\r\n\r\nHow to reproduce\r\n================\r\nIt is not easy to reproduce the issue because it happens occasionally by unknown cause.\r\n\r\n\r\n\r\nChecklist\r\n=========\r\nPlease provide the following information:\r\n\r\n - [x] librdkafka version (release number or git tag): 0.9.2rc\r\n - [x] Apache Kafka version: 0.10.0.1\r\n - [ ] librdkafka client configuration:\r\n - [x] Operating system: CentOS 6\r\n - [ ] Using the legacy Consumer\r\n - [x] Using the high-level KafkaConsumer\r\n - [ ] Provide logs (with `debug=..` as necessary) from librdkafka\r\n - [x] Provide broker log excerpts\r\n - [ ] Critical issue\r\n\r\n\r\n```\r\n[2016-10-06 10:37:10,507] ERROR Closing socket for 100.98.114.220:9092-100.98.120.193:50498 because of error (kafka.network.Processor)\r\nkafka.network.InvalidRequestException: Error getting request for apiKey: -12682 and apiVersion: -1\r\n    at kafka.network.RequestChannel$Request.liftedTree2$1(RequestChannel.scala:95)\r\n    at kafka.network.RequestChannel$Request.<init>(RequestChannel.scala:87)\r\n    at kafka.network.Processor$$anonfun$processCompletedReceives$1.apply(SocketServer.scala:488)\r\n    at kafka.network.Processor$$anonfun$processCompletedReceives$1.apply(SocketServer.scala:483)\r\n    at scala.collection.Iterator$class.foreach(Iterator.scala:893)\r\n    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)\r\n    at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)\r\n    at scala.collection.AbstractIterable.foreach(Iterable.scala:54)\r\n    at kafka.network.Processor.processCompletedReceives(SocketServer.scala:483)\r\n    at kafka.network.Processor.run(SocketServer.scala:413)\r\n    at java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.IllegalArgumentException: Unexpected ApiKeys id `-12682`, it should be between `0` and `18` (inclusive)\r\n    at org.apache.kafka.common.protocol.ApiKeys.forId(ApiKeys.java:71)\r\n    at org.apache.kafka.common.requests.AbstractRequest.getRequest(AbstractRequest.java:39)\r\n    at kafka.network.RequestChannel$Request.liftedTree2$1(RequestChannel.scala:92)\r\n    ... 10 more\r\n```\r\n100.98.114.220: IP address of one of brokers\r\n100.98.120.193: IP address of one of consumers"}}
{"actor":{"display_login":"muumu"}}