Crux is becoming XTDB!

You can read the rename announcement, or head to this page on the new XTDB site (where you'll be taken in 10 seconds).


Embedded Kafka

Crux is ready to work with an embedded Kafka for when you don’t have an independently running Kafka available to connect to (such as during development).

Project Dependencies

juxt/crux-core {:mvn/version "20.12-1.13.0-beta"}
juxt/crux-kafka-embedded {:mvn/version "20.12-1.13.0-beta"}

Getting started

(require '[crux.kafka.embedded :as ek])

(defn start-embedded-kafka [kafka-port storage-dir]
  (ek/start-embedded-kafka {:crux.kafka.embedded/zookeeper-data-dir (io/file storage-dir "zk-data")
                            :crux.kafka.embedded/kafka-log-dir (io/file storage-dir "kafka-log")
                            :crux.kafka.embedded/kafka-port kafka-port}))

You can later stop the Embedded Kafka if you wish:

(.close embedded-kafka)