Skip to content

Commit 087352e

Browse files
committed
Information improvements
Rename watchers to observers. Add more information about progess: data rate, data volume.
1 parent 11a7231 commit 087352e

File tree

10 files changed

+359
-162
lines changed

10 files changed

+359
-162
lines changed

Cargo.lock

Lines changed: 29 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
[package]
2-
name = "kafka_replicator"
3-
version = "0.1.0"
2+
name = "kafka-replicator"
3+
version = "0.4.0"
44
authors = ["Alex"]
55
edition = "2018"
6+
description = "Application for replication data between kafka clusters."
7+
readme = "README.rst"
8+
repository = "https://github.com/lispython/kafka-replicator/"
9+
license-file = "LICENSE"
10+
keywords = ["kafka", "replication", "observer"]
11+
categories = ["command-line-utilities"]
12+
613

714
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
815

@@ -21,6 +28,8 @@ rdkafka-sys = "1.3.1"
2128
rdkafka = { version = "0.23.1", features = ["ssl", "sasl"]}
2229
env_logger = "0.7.1"
2330
futures = "0.3.0"
31+
byte-unit = "4.0.6"
32+
pretty-bytes = "0.2.2"
2433

2534

2635
[profile.dev]
@@ -35,14 +44,14 @@ name = "replicator"
3544
path = "src/lib.rs"
3645

3746
[[bin]]
38-
name = "replicator"
47+
name = "kafka-replicator"
3948
path = "src/main.rs"
4049

4150

4251
[[bin]]
43-
name = "producer"
52+
name = "kafka-producer"
4453
path = "src/producer.rs"
4554

4655
[[bin]]
47-
name = "watcher"
48-
path = "src/watcher.rs"
56+
name = "kafka-observer"
57+
path = "src/observer.rs"

fixtures/example-config.yml renamed to examples/example-config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ routes:
5151
progress_every_secs: 10
5252

5353

54-
watchers:
54+
observers:
5555
- client: cl_1_client_1
5656
name: "my name"
5757
topics:
@@ -64,6 +64,8 @@ watchers:
6464
topic: 'topic3'
6565
topics:
6666
- 'topic2'
67+
show_progress_every_secs: 5
68+
6769

6870
- client: cl_1_client_1
6971
topic: 'topic1'

examples/experiment-1.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
clusters:
2+
- name: cluster_1
3+
hosts:
4+
- replicator-kafka-1:9092
5+
- replicator-kafka-1:9092
6+
- kafka_replicator_replicator_kafka_1_1:9092
7+
- name: cluster_2
8+
hosts:
9+
- kafka_replicator_replicator_kafka_2_1:9092
10+
- replicator-kafka-2:9092
11+
12+
clients:
13+
- client: cl_1_client_1
14+
cluster: cluster_1
15+
config: # optional
16+
message.timeout.ms: 5000
17+
auto.offset.reset: earliest
18+
- client: cl_2_client_1
19+
cluster: cluster_2
20+
21+
routes:
22+
- upstream_client: cl_1_client_1
23+
downstream_client: cl_1_client_1
24+
upstream_topics:
25+
- 'experimental_topic_1'
26+
downstream_topic: 'experimental_topic_2_output'
27+
repartitioning_strategy: strict_p2p # strict_p2p | random
28+
upstream_group_id: group1
29+
progress_every_secs: 5
30+
limits:
31+
messages_per_sec: 10000
32+
number_of_messages:
33+
34+
35+
observers:
36+
- client: cl_1_client_1
37+
name: "Experiment observer"
38+
topics:
39+
- 'experimental_topic_1'
40+
- 'experimental_topic_2_output'
41+
fetch_timeout_secs: 5
42+
show_progress_every_secs: 10

src/cli.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub struct CommandLine {
3030

3131
#[structopt(long)]
3232
pub validate: bool,
33-
3433
}
3534

3635
pub fn parse_args() -> CommandLine {

0 commit comments

Comments
 (0)