[
https://issues.apache.org/jira/browse/KAFKA-4832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wang Hong updated KAFKA-4832:
-----------------------------
Description:
1.When I tried to send msg by Async with wrong IP in loop 1400times 10batches.
2.I use javaapi.kafkaproducer designed by Factory.
3.1 of 10 batches I take Producer.Connected() and Producer.Closed().
4.I know I send msg to a wrong IP finally, But I noticed the terminal was
blocking. It can't close normally.
function just like that :
public static void go(int s) throws Exception {
KafkaService kf = new KafkaServiceImpl();//init properties
for (int i = 0; i < 1400; i++) {
String msg = "a b 0a b c d e 0a b c d e 0" + s + "--" +
i;
System.out.println(msg);
kf.push(msg); //producer.send()
}
kf.closeProducerFactory();//producer.closed()
System.out.println(s);
Thread.sleep(1000);
}
kf.closeProducerFactory() is used by producer.closed(),
But Async send was always waiting for kafka server .I gave it a wrong IP.
I think it waits for long time Will bring problem with whole system.it occupy
resources.
And another problem was I sending kafka msg with true IP and Runnable
,Threadpools, all is right .
was:
1.When I tried to send msg by Async with wrong IP in loop 1400times 10batches.
2.I use javaapi.kafkaproducer designed by Factory.
3.1 of 10 batches I take Producer.Connected() and Producer.Closed().
Summary: kafka producer send Async message to the wrong IP cannot to
stop producer.close() (was: kafka producer send message to the wrong IP cannot
to stop producer.close())
> kafka producer send Async message to the wrong IP cannot to stop
> producer.close()
> ---------------------------------------------------------------------------------
>
> Key: KAFKA-4832
> URL: https://issues.apache.org/jira/browse/KAFKA-4832
> Project: Kafka
> Issue Type: Bug
> Components: producer
> Affects Versions: 0.8.2.2
> Environment: JDK8 Eclipse Mars Win7
> Reporter: Wang Hong
> Fix For: 0.8.2.2
>
>
> 1.When I tried to send msg by Async with wrong IP in loop 1400times 10batches.
> 2.I use javaapi.kafkaproducer designed by Factory.
> 3.1 of 10 batches I take Producer.Connected() and Producer.Closed().
> 4.I know I send msg to a wrong IP finally, But I noticed the terminal was
> blocking. It can't close normally.
> function just like that :
> public static void go(int s) throws Exception {
> KafkaService kf = new KafkaServiceImpl();//init properties
> for (int i = 0; i < 1400; i++) {
> String msg = "a b 0a b c d e 0a b c d e 0" + s + "--" +
> i;
> System.out.println(msg);
> kf.push(msg); //producer.send()
> }
> kf.closeProducerFactory();//producer.closed()
> System.out.println(s);
> Thread.sleep(1000);
> }
> kf.closeProducerFactory() is used by producer.closed(),
> But Async send was always waiting for kafka server .I gave it a wrong IP.
> I think it waits for long time Will bring problem with whole system.it occupy
> resources.
> And another problem was I sending kafka msg with true IP and Runnable
> ,Threadpools, all is right .
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)