-
Notifications
You must be signed in to change notification settings - Fork 46
/
docker-compose.3.consumers.yml
115 lines (99 loc) · 2.61 KB
/
docker-compose.3.consumers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "2.4"
services:
consumer-1: &consumer-anchor
build: ./sample-application/consumer
hostname: consumer-1
environment:
JAVA_OPTS: -javaagent:/usr/share/jmx_exporter/jmx_prometheus_javaagent-0.12.0.jar=1234:/usr/share/jmx_exporter/kafka-consumer.yml -Xmx256M -Xms256M
KAFKA_BOOTSTRAP_SERVERS: "kafka-1:9092, kafka-2:9092, kafka-3:9092"
TOPIC: "workshop_topic_2"
CHECK_GAPS: "false"
COMMIT_STRATEGY: "AUTO_COMMIT" # possible values AUTO_COMMIT or PER_BATCH or PER_MESSAGES
KAFKA_ENABLE_AUTO_COMMIT_CONFIG: "false" # default true if group.id is provided
KAFKA_ISOLATION_LEVEL_CONFIG: "read_committed" # default read_uncommitted
# default: org.apache.kafka.clients.consumer.RangeAssignor
KAFKA_PARTITION_ASSIGNMENT_STRATEGY_CONFIG: "org.apache.kafka.clients.consumer.CooperativeStickyAssignor"
volumes:
- ./jmx-exporter:/usr/share/jmx_exporter/
depends_on:
- kafka-1
- kafka-2
- kafka-3
consumer-2:
<<: *consumer-anchor
hostname: consumer-2
consumer-3:
<<: *consumer-anchor
hostname: consumer-3
# extends from common compose.services.yml
jmx-exporter:
extends:
file: compose.services.yml
zookeeper-1:
extends:
file: compose.services.yml
service: zookeeper-1
zookeeper-2:
extends:
file: compose.services.yml
service: zookeeper-2
zookeeper-3:
extends:
file: compose.services.yml
service: zookeeper-3
kafka-1:
extends:
file: compose.services.yml
service: kafka-1
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
kafka-2:
extends:
file: compose.services.yml
service: kafka-2
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
kafka-3:
extends:
file: compose.services.yml
service: kafka-3
depends_on:
- zookeeper-1
- zookeeper-2
- zookeeper-3
producer:
extends:
file: compose.services.yml
service: producer
environment:
TOPIC: "workshop_topic_2"
REPLICATION_FACTOR: 3
NUMBER_OF_PARTITIONS: 6
depends_on:
- kafka-1
- kafka-2
- kafka-3
prometheus:
extends:
file: compose.services.yml
service: prometheus
alertmanager:
extends:
file: compose.services.yml
service: alertmanager
node-exporter:
extends:
file: compose.services.yml
service: node-exporter
kafka-lag-exporter:
extends:
file: compose.services.yml
service: kafka-lag-exporter
grafana:
extends:
file: compose.services.yml
service: grafana