# Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected

**URL:** <https://forum.confluent.io/t/bootstrap-broker-localhost-9092-id-1-rack-null-disconnected/2353>\
**Category:** Java Clients\
**Created:** [27 July 2021 02:03 UTC](https://forum.confluent.io/t/bootstrap-broker-localhost-9092-id-1-rack-null-disconnected/2353 "2021-07-27T02:03:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aupres](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@aupres](https://forum.confluent.io/u/aupres)\
**Post date:** [27 July 2021 02:03 UTC](https://forum.confluent.io/t/bootstrap-broker-localhost-9092-id-1-rack-null-disconnected/2353/1 "2021-07-27T02:03:56Z")

</div>

Hello, I am newbie on Kafka and try to make kafka producer java codes on Windows 10. First, below is my Kafka producer codes.

```auto
Properties kafkaProdProperty = new Properties();
kafkaProdProperty.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, systemProp.get("kafka.brokerlist"));
kafkaProdProperty.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
kafkaProdProperty.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);
kafkaProdProperty.put(ProducerConfig.ACKS_CONFIG, "0");
kafkaProdProperty.put(ProducerConfig.RETRIES_CONFIG, Integer.valueOf(1));
kafkaProdProperty.put(ProducerConfig.BATCH_SIZE_CONFIG, Integer.valueOf(20000));
kafkaProdProperty.put(ProducerConfig.LINGER_MS_CONFIG, Integer.valueOf(1));
kafkaProdProperty.put(ProducerConfig.BUFFER_MEMORY_CONFIG, Integer.valueOf(133554432));

Producer<String, String> kafkaProducer = new KafkaProducer<String, String>(kafkaProdProperty);

String line = //Read from hadoop file system continuously

ProducerRecord<String, String> kafkaProducerRecord = new ProducerRecord<String, String>(topic, line);
kafkaProducer.send(kafkaProducerRecord, new KafkaProducerCallback());

```

The execution of kafka producer java codes starts successfully without any exceptions. But the input line from hadoop become longer and bigger, the warning message is thrown like below,

```auto
2021-07-27 10:30:28 WARN NetworkClient:780 - [Producer clientId=producer-8049] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.
2021-07-27 10:30:28 WARN NetworkClient:1077 - [Producer clientId=producer-8049] Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected
2021-07-27 10:30:28 WARN NetworkClient:780 - [Producer clientId=producer-8049] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available.
2021-07-27 10:30:28 WARN NetworkClient:1077 - [Producer clientId=producer-8049] Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected

```

I think this issue is related with kafka java resources. But I have no idea what to configure. When the smaller input lines are set on kafka producer parameter. It throws no warning messages like above. Any reply will be welcome. Best regards
