-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-local.yml
50 lines (46 loc) · 1.26 KB
/
docker-compose-local.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
version: "3"
services:
zookeeper:
image: wurstmeister/zookeeper
hostname: zookeeper
networks:
- kafka
kafka:
image: wurstmeister/kafka:0.10.1.1
hostname: kafka
networks:
- kafka
- kafka-matcher
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
depends_on:
- zookeeper
topic-producer:
image: wurstmeister/kafka:0.10.1.1
networks:
- kafka
command: "bash -c 'for i in `seq 1 10000`;
do
echo \"{\\\"value\\\":$$i}\" | /opt/kafka/bin/kafka-console-producer.sh --broker-list kafka:9092 --topic sourceTopic;
echo $$i;
done'"
depends_on:
- kafka
kafka-transform:
image: socialmetrix/kafka-transform
environment:
- rules.type=local
- rules.local=[{"query":"value:[5 TO 10}","template":{"display":"5 <= {{value}} < 10","value":"{{value}}"}}]
- kafka.application.id=kafka-transform
- kafka.bootstrap.servers=kafka:9092
- kafka.topic.source=sourceTopic
- kafka.topic.sink=sinkTopic
networks:
- kafka-matcher
depends_on:
- kafka
networks:
kafka:
kafka-matcher: