The script repeats almost 40 times the log below until this really can create the topic:
WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
PS: I realise that for the same project, the issue below just happens in MAC M1 environments, for Linux doesn't.
I have these settings in my docker-composer:
And when I run the
docker compose up
and after run a .sh script to create topics as below:docker-compose -f local/docker-compose.yaml exec kafka kafka-topics --create --if-not-exists --bootstrap-server localhost:9092 --replication-factor 1 --partitions 2 --topic area.product-created
The script repeats almost 40 times the log below until this really can create the topic:
WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)