-
Notifications
You must be signed in to change notification settings - Fork 1
/
thimble.clj
27 lines (25 loc) · 1.08 KB
/
thimble.clj
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
(ns troy-west.thimble
(:require [troy-west.thimble.kafka]
[troy-west.thimble.zookeeper]
[troy-west.thimble.cassandra]
[troy-west.arche.integrant]
[troy-west.arche.hugcql]
[integrant.core :as ig]))
(defn start
([]
(start {:thimble/zookeeper.server {}
:thimble/kafka.broker {:zookeeper (ig/ref :thimble/zookeeper.server)
:topics ["test-topic-1"]}
:thimble/kafka.producer {:broker (ig/ref :thimble/kafka.broker)}
:thimble/kafka.consumer {:broker (ig/ref :thimble/kafka.broker)
:config {"group.id" "test"
"enable.auto.commit" "true"}}
:thimble/cassandra.cluster {}
:arche/cluster (ig/ref :thimble/cassandra.cluster)
:arche/connection {:cluster (ig/ref :arche/cluster)
:keyspace "sandbox"}}))
([config]
(ig/init config)))
(defn stop
[state]
(ig/halt! state))