Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alarm doc: Use bootstrap-server ... #2285

Merged
merged 1 commit into from
Jun 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions app/alarm/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Similarly, change the directory setting in `server.properties`
Kafka depends on Zookeeper. By default, Kafka will quit if it cannot connect to Zookeeper within 6 seconds.
When the Linux host boots up, this may not be long enough to allow Zookeeper to start.

# Timeout in ms for connecting to zookeeper defaults to 6000ms.
# Suggest a much longer time (5 minutes)
zookeeper.connection.timeout.ms=300000
# Timeout in ms for connecting to zookeeper defaults to 6000ms.
# Suggest a much longer time (5 minutes)
zookeeper.connection.timeout.ms=300000

By default, Kafka will automatically create topics.
This means you could accidentally start an alarm server for a non-existing configuration.
Expand All @@ -60,11 +60,13 @@ Best disable auto-topic-creation, create topics on purpose with the correct sett
and have alarm tools that try to access a non-existing configuration fail.

# Suggest to add this to prevent automatic topic creation,
auto.create.topics.enable=false
auto.create.topics.enable=false

If the following "First steps" generate errors of the type

WARN Error while fetching metadata with correlation id 39 : .. LEADER_NOT_AVAILABLE
or
ERROR ..TimeoutException: Timed out waiting for a node assignment

then define the host name in `config/server.properties`.
For tests, you can use localhost:
Expand Down Expand Up @@ -111,13 +113,13 @@ It is not required for the alarm system setup
but simply meant to learn about Kafka or to test connectivity.

# Create new topic
kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --replication-factor 1 --partitions 1 --topic test
kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --replication-factor 1 --partitions 1 --topic test

# Topic info
kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --list
kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --describe
kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic test
kafka/bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type topics --describe
kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --list
kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --describe
kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic test
kafka/bin/kafka-configs.sh --bootstrap-server localhost:9092 --entity-type topics --describe

# Produce messages for topic (no key)
kafka/bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
Expand All @@ -133,7 +135,7 @@ but simply meant to learn about Kafka or to test connectivity.
kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --property print.key=true --property key.separator=": " --topic test --from-beginning

# Delete topic
kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --delete --topic test
kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic test


Stop local instance:
Expand Down