You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "vinay (JIRA)" <ji...@apache.org> on 2018/08/23 06:10:00 UTC

[jira] [Created] (KAFKA-7330) Kakfa 0.10.2.1 producer close method issue

vinay created KAFKA-7330:
----------------------------

             Summary: Kakfa 0.10.2.1 producer close method issue
                 Key: KAFKA-7330
                 URL: https://issues.apache.org/jira/browse/KAFKA-7330
             Project: Kafka
          Issue Type: Bug
          Components: clients
    Affects Versions: 0.10.2.1
         Environment: linux
            Reporter: vinay


We are creating new producer connections each time but in separate threads(pool of 40 and all threads will be used most of the time) and closing it when work in done. its a java process.

Not always but sometimes close connection takes more than 10 seconds and observerd that particular message was never published.

Could you please help.

 

{{Properties prop = new Properties(); }}

{{prop.put("bootstarp.servers",-);}}

{{prop.put("acks","all"); }}

{{//some ssl properties }}

{{--- }}

{{//ends KafkaProducer }}

{{connection = null; }}

{{try { }}

{{connection = new KafkaProducer<String, byte[]>(props); msg.setTopic(topic); }}

{{msg.setDate(new Date());}}

{{ connection.send(msg);}}

{{ } catch() {}}

{{ } finally { }}

{{connection.close();// sometimes it takes more than 10 secs and the above message was not send }}

{{}}}

Producer config :

max.in.flight.requests.per.connection = 5

acks= all

batch.size = 16384

linger.ms = 0

max.block.ms = 60000

request.timeout.ms = 5000

retries = 0

-----------------------

 

Even  i see below warning most of the times,

Failed to send SSL Close message:

java.io.IOException: Unexpected status returned by SSLEngine.wrap, expected CLOSED, received OK. Will not send close message to peer.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)