-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
118 lines (110 loc) · 3.45 KB
/
docker-compose.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
116
117
118
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.0.0
hostname: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka:
image: confluentinc/cp-kafka:7.0.0
hostname: kafka-1
depends_on:
- zookeeper
ports:
- 29092:29092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka:9092,LOCAL://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: DOCKER:PLAINTEXT,LOCAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LOCAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_DELETE_TOPIC_ENABLE: "true"
akhq:
image: tchiotludo/akhq
environment:
AKHQ_CONFIGURATION: |
akhq:
server:
access-log:
enabled: false
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:9092"
ports:
- 8082:8080
links:
- kafka
producer:
build: producer/
environment:
KAFKA_BOOTSTRAP_SERVER: "kafka:9092"
KAFKA_TOPIC: "sample-retry"
depends_on:
- kafka
no-retry-consumer:
build: retriable-consumer/
environment:
KAFKA_BOOTSTRAP_SERVER: "kafka:9092"
KAFKA_TOPIC: "sample-retry"
KAFKA_PARTITION: 4
KAFKA_NUMBER_RETRY: 0 # 0 = NO_RETRY, -1 = INFINITE_RETRY, > 0 = MAX_RETRY
KAFKA_GROUP_ID: "no-retriable-consumer-group"
KAFKA_RESET_STRATEGY: "earliest"
KAFKA_MAX_POLL_INTERVAL_MS: 300000
KAFKA_EXTERNAL_SERVICE_URL: "http://service/service"
KAFKA_COMMIT_INTERVAL_MS: 10000
depends_on:
- kafka
limited-retries-consumer:
build: retriable-consumer/
environment:
KAFKA_BOOTSTRAP_SERVER: "kafka:9092"
KAFKA_TOPIC: "sample-retry"
KAFKA_PARTITION: 4
KAFKA_NUMBER_RETRY: 10 # 0 = NO_RETRY, -1 = INFINITE_RETRY, > 0 = MAX_RETRY
KAFKA_GROUP_ID: "limited-retriable-consumer-group"
KAFKA_RESET_STRATEGY: "earliest"
KAFKA_MAX_POLL_INTERVAL_MS: 300000
KAFKA_EXTERNAL_SERVICE_URL: "http://service/service"
KAFKA_COMMIT_INTERVAL_MS: 10000
depends_on:
- kafka
infinite-retries-consumer:
build: retriable-consumer/
environment:
KAFKA_BOOTSTRAP_SERVER: "kafka:9092"
KAFKA_TOPIC: "sample-retry"
KAFKA_PARTITION: 4
KAFKA_NUMBER_RETRY: -1 # 0 = NO_RETRY, -1 = INFINITE_RETRY, > 0 = MAX_RETRY
KAFKA_GROUP_ID: "infinite-retriable-consumer-group"
KAFKA_RESET_STRATEGY: "earliest"
KAFKA_MAX_POLL_INTERVAL_MS: 300000
KAFKA_EXTERNAL_SERVICE_URL: "http://service/service"
KAFKA_COMMIT_INTERVAL_MS: 10000
depends_on:
- kafka
max-poll-internal-raising-consumer:
build: retriable-consumer/
environment:
KAFKA_BOOTSTRAP_SERVER: "kafka:9092"
KAFKA_TOPIC: "sample-retry"
KAFKA_PARTITION: 4
KAFKA_NUMBER_RETRY: 20 # 0 = NO_RETRY, -1 = INFINITE_RETRY, > 0 = MAX_RETRY
KAFKA_GROUP_ID: "max-poll-internal-raising-consumer-group"
KAFKA_RESET_STRATEGY: "earliest"
KAFKA_MAX_POLL_INTERVAL_MS: 60000
KAFKA_SIMULATE_EXTERNAL: "true"
KAFKA_EXTERNAL_PERCENTAGE_FAILURES: 100
DURATION_SLEEP_SERVICE_FAIL: 4000
KAFKA_COMMIT_INTERVAL_MS: 10000
depends_on:
- kafka
service:
build: external-web-api/
container_name: service
hostname: service
environment:
PERCENT_OF_ERROR: 75