When using Crux at scale it is recommended to use multiple Crux nodes connected via a Kafka cluster. Kafka can be used for both the Crux transaction log and the document store.
Kafka nodes have the following properties:
Property | Description | Default value |
---|---|---|
| URL for connecting to Kafka | localhost:9092 |
| Name of Kafka transaction log topic | crux-transaction-log |
| Name of Kafka documents topic | crux-docs |
| Option to automatically create Kafka topics if they do not already exist | true |
| Number of partitions for the document topic | 1 |
| Number of times to replicate data on Kafka | 1 |
| File to supply Kafka connection properties to the underlying Kafka API | |
| Map to supply Kafka connection properties to the underlying Kafka API |
link:example$deps.edn[role=include]
link:example$deps.edn[role=include]
Use the API to start a Kafka node, configuring it with the bootstrap-servers
property in order to connect to Kafka:
link:example$src/docs/examples.clj[role=include]
If you don’t specify kv-store then by default the Kafka node will use RocksDB.
You will need to add RocksDB to your list of project dependencies.
|
You can later stop the node if you wish:
link:example$src/docs/examples.clj[role=include]
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close