Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Markus Gulden
committed
Jan 1, 2019
1 parent
8c9f493
commit c39fe1c
Showing
4 changed files
with
110 additions
and
110 deletions.
There are no files selected for viewing
88 changes: 0 additions & 88 deletions
88
libraries-data/src/main/kafka-connect/04_Custom/connect-distributed.properties
This file was deleted.
Oops, something went wrong.
30 changes: 11 additions & 19 deletions
30
libraries-data/src/main/kafka-connect/04_Custom/connect-mongodb-sink.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
{ | ||
"firstName": "John", | ||
"lastName": "Smith", | ||
"age": 25, | ||
"address": { | ||
"streetAddress": "21 2nd Street", | ||
"city": "New York", | ||
"state": "NY", | ||
"postalCode": "10021" | ||
}, | ||
"phoneNumber": [{ | ||
"type": "home", | ||
"number": "212 555-1234" | ||
}, { | ||
"type": "fax", | ||
"number": "646 555-4567" | ||
} | ||
], | ||
"gender": { | ||
"type": "male" | ||
"name": "mongodb-sink", | ||
"config": { | ||
"connector.class": "at.grahsl.kafka.connect.mongodb.MongoDbSinkConnector", | ||
"tasks.max": 1, | ||
"topics": "connect-custom", | ||
"mongodb.connection.uri": "mongodb://mongo-db/test?retryWrites=true", | ||
"mongodb.collection": "MyCollection", | ||
"key.converter": "org.apache.kafka.connect.json.JsonConverter", | ||
"key.converter.schemas.enable": false, | ||
"value.converter": "org.apache.kafka.connect.json.JsonConverter", | ||
"value.converter.schemas.enable": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
libraries-data/src/main/kafka-connect/04_Custom/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
version: '3.3' | ||
|
||
services: | ||
mosquitto: | ||
image: eclipse-mosquitto:1.5.5 | ||
hostname: mosquitto | ||
container_name: mosquitto | ||
expose: | ||
- "1883" | ||
ports: | ||
- "1883:1883" | ||
zookeeper: | ||
image: zookeeper:3.4.9 | ||
restart: unless-stopped | ||
hostname: zookeeper | ||
container_name: zookeeper | ||
ports: | ||
- "2181:2181" | ||
environment: | ||
ZOO_MY_ID: 1 | ||
ZOO_PORT: 2181 | ||
ZOO_SERVERS: server.1=zookeeper:2888:3888 | ||
volumes: | ||
- ./zookeeper/data:/data | ||
- ./zookeeper/datalog:/datalog | ||
kafka: | ||
image: confluentinc/cp-kafka:5.1.0 | ||
hostname: kafka | ||
container_name: kafka | ||
ports: | ||
- "9092:9092" | ||
environment: | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092 | ||
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181" | ||
KAFKA_BROKER_ID: 1 | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
volumes: | ||
- ./kafka/data:/var/lib/kafka/data | ||
depends_on: | ||
- zookeeper | ||
kafka-connect: | ||
image: confluentinc/cp-kafka-connect:5.1.0 | ||
hostname: kafka-connect | ||
container_name: kafka-connect | ||
ports: | ||
- "8083:8083" | ||
environment: | ||
CONNECT_BOOTSTRAP_SERVERS: "kafka:9092" | ||
CONNECT_REST_ADVERTISED_HOST_NAME: connect | ||
CONNECT_REST_PORT: 8083 | ||
CONNECT_GROUP_ID: compose-connect-group | ||
CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs | ||
CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets | ||
CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status | ||
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter | ||
CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter | ||
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter" | ||
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter" | ||
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1" | ||
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1" | ||
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1" | ||
CONNECT_PLUGIN_PATH: '/usr/share/java,/etc/kafka-connect/jars' | ||
CONNECT_CONFLUENT_TOPIC_REPLICATION_FACTOR: 1 | ||
volumes: | ||
- /tmp/custom/jars:/etc/kafka-connect/jars | ||
depends_on: | ||
- zookeeper | ||
- kafka | ||
- mosquitto | ||
mongo-db: | ||
image: mongo:4.0.5 | ||
hostname: mongo-db | ||
container_name: mongo-db | ||
expose: | ||
- "27017" | ||
ports: | ||
- "27017:27017" | ||
command: --bind_ip_all --smallfiles | ||
volumes: | ||
- ./mongo-db:/data | ||
mongoclient: | ||
image: mongoclient/mongoclient:2.2.0 | ||
container_name: mongoclient | ||
hostname: mongoclient | ||
depends_on: | ||
- mongo-db | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
MONGO_URL: "mongodb://mongo-db:27017" | ||
PORT: 3000 | ||
expose: | ||
- "3000" |