0

I've provisioned MSK, 2 nodes, while pushing mesage to topic get success but with following warning

 18:33:06.318 [kafka-producer-network-thread | producer-1]
  WARN  o.apache.kafka.clients.NetworkClient - [Producer clientId=producer-1] 
  Error while fetching metadata with correlation id 1: 
  {mytopic=LEADER_NOT_AVAILABLE}

Any ideas why this can be? My first guess I need more than 2 nodes. Thanks.

Andriy Kopachevskyy
  • 7,276
  • 10
  • 47
  • 56
  • Well, there's several possible reasons, including: a general network exception, or the cluster is simply not healthy, or your producer has some bad configuration – OneCricketeer Jun 21 '21 at 20:50

1 Answers1

0

Reason was in automatic topic creation, when topic created automatically with default replication factor of 1 was applied, when I create topic manualy with correct replication factor 3 (same as nodes count) problem went away.

Andriy Kopachevskyy
  • 7,276
  • 10
  • 47
  • 56