1/5/2023 0 Comments Publish with kafka toolSo, let's add configuration for one more node each for Zookeeper and Kafka services:. Connection Using Kafka ToolĪ cluster setup for Apache Kafka needs to have redundancy for both Zookeeper servers and the Kafka servers. With that, our Kafka setup is ready for use. Kafka_1 | INFO Started socket server acceptors and processors () Kafka_1 | INFO Started data-plane acceptor and processor(s) for endpoint : ListenerName(PLAINTEXT) () Kafka_1 | DEBUG Started partition state machine with initial state -> HashMap() () Kafka_1 | DEBUG Started replica state machine with initial state -> HashMap() () Start Kafka ServerĬonnection to localhost port 22181 succeeded!Ĭonnection to localhost port 29092 succeeded!Īdditionally, we can also check the verbose logs while the containers are starting up and verify that the Kafka server is up: $ docker-compose logs kafka | grep -i started Similarly, the kafka service is exposed to the host applications through port 29092, but it is actually advertised on port 9092 within the container environment configured by the KAFKA_ADVERTISED_LISTENERS property. However, for any client running on the host, it'll be exposed on port 22181. In this setup, our Zookeeper server is listening on port= 2181 for the kafka service, which is defined within the same container setup. KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 Let's create a simple docker-compose.yml file with two services, namely zookeeper and kafka: version: '2'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |