Development utilities and configurations
Development utilities and configurations
(cluster-info)
Get information about the local Kafka cluster
Get information about the local Kafka cluster
Default docker-compose.yml content for Kafka development
Default docker-compose.yml content for Kafka development
(delete-dev-topic topic-name)
Delete a development topic (use with caution!)
Delete a development topic (use with caution!)
(describe-dev-topic topic-name)
Describe a topic with detailed information
Describe a topic with detailed information
(get-compose-config mode)
Get docker-compose configuration based on mode.
Modes: :zookeeper (default) - Traditional Kafka with Zookeeper :kraft - Kafka with KRaft (no Zookeeper) :simple - Simple KRaft setup (single container, faster startup)
Usage: (get-compose-config :kraft) (get-compose-config :simple)
Get docker-compose configuration based on mode. Modes: :zookeeper (default) - Traditional Kafka with Zookeeper :kraft - Kafka with KRaft (no Zookeeper) :simple - Simple KRaft setup (single container, faster startup) Usage: (get-compose-config :kraft) (get-compose-config :simple)
(kafka-dev-setup!)
(kafka-dev-setup! mode-or-topics)
(kafka-dev-setup! mode topics)
Complete development setup: start Kafka, wait for it to be ready, and create common topics.
Usage: (kafka-dev-setup!) ; Default: Zookeeper mode with default topics (kafka-dev-setup! :kraft) ; KRaft mode with default topics (kafka-dev-setup! :simple) ; Simple KRaft mode with default topics (kafka-dev-setup! ["topic1" "topic2"]) ; Zookeeper mode with custom topics (kafka-dev-setup! :kraft ["topic1" "topic2"]) ; KRaft mode with custom topics
Complete development setup: start Kafka, wait for it to be ready, and create common topics. Usage: (kafka-dev-setup!) ; Default: Zookeeper mode with default topics (kafka-dev-setup! :kraft) ; KRaft mode with default topics (kafka-dev-setup! :simple) ; Simple KRaft mode with default topics (kafka-dev-setup! ["topic1" "topic2"]) ; Zookeeper mode with custom topics (kafka-dev-setup! :kraft ["topic1" "topic2"]) ; KRaft mode with custom topics
(kafka-dev-teardown!)
(kafka-dev-teardown! remove-volumes?)
Complete teardown: stop all services and optionally remove data.
Usage: (kafka-dev-teardown!) ; Stop services, keep data (kafka-dev-teardown! true) ; Stop services and remove all data
Complete teardown: stop all services and optionally remove data. Usage: (kafka-dev-teardown!) ; Stop services, keep data (kafka-dev-teardown! true) ; Stop services and remove all data
(kafka-docker-down!)
(kafka-docker-down! remove-volumes?)
Stop and remove Kafka services using Docker Compose.
Usage: (kafka-docker-down!) ; Stop services (kafka-docker-down! true) ; Stop services and remove volumes
Stop and remove Kafka services using Docker Compose. Usage: (kafka-docker-down!) ; Stop services (kafka-docker-down! true) ; Stop services and remove volumes
(kafka-docker-logs!)
(kafka-docker-logs! service)
(kafka-docker-logs! service follow?)
Show logs from Kafka Docker services.
Usage: (kafka-docker-logs!) ; Show all logs (kafka-docker-logs! "kafka") ; Show logs for specific service (kafka-docker-logs! "kafka" true) ; Follow logs for specific service
Show logs from Kafka Docker services. Usage: (kafka-docker-logs!) ; Show all logs (kafka-docker-logs! "kafka") ; Show logs for specific service (kafka-docker-logs! "kafka" true) ; Follow logs for specific service
(kafka-docker-restart!)
(kafka-docker-restart! service)
Restart Kafka Docker services.
Usage: (kafka-docker-restart!) ; Restart all services (kafka-docker-restart! "kafka") ; Restart specific service
Restart Kafka Docker services. Usage: (kafka-docker-restart!) ; Restart all services (kafka-docker-restart! "kafka") ; Restart specific service
(kafka-docker-status)
Check the status of Kafka Docker services.
Usage: (kafka-docker-status)
Check the status of Kafka Docker services. Usage: (kafka-docker-status)
(kafka-docker-up!)
(kafka-docker-up! mode-or-content)
Start Kafka and related services using Docker Compose. Generates docker-compose.yml if it doesn't exist.
Usage: (kafka-docker-up!) ; Use default (zookeeper) configuration (kafka-docker-up! :kraft) ; Use KRaft mode (no Zookeeper) (kafka-docker-up! :simple) ; Use simple KRaft mode (kafka-docker-up! custom-compose-content) ; Use custom configuration string
Start Kafka and related services using Docker Compose. Generates docker-compose.yml if it doesn't exist. Usage: (kafka-docker-up!) ; Use default (zookeeper) configuration (kafka-docker-up! :kraft) ; Use KRaft mode (no Zookeeper) (kafka-docker-up! :simple) ; Use simple KRaft mode (kafka-docker-up! custom-compose-content) ; Use custom configuration string
(kafka-setup-kraft!)
(kafka-setup-kraft! topics)
Complete setup with KRaft mode (no Zookeeper). Modern Kafka architecture.
Usage: (kafka-setup-kraft!) ; Setup with default topics (kafka-setup-kraft! ["topic1"]) ; Setup with custom topics
Complete setup with KRaft mode (no Zookeeper). Modern Kafka architecture. Usage: (kafka-setup-kraft!) ; Setup with default topics (kafka-setup-kraft! ["topic1"]) ; Setup with custom topics
(kafka-setup-simple!)
(kafka-setup-simple! topics)
Complete setup with simple KRaft mode. Minimal, fastest setup.
Usage: (kafka-setup-simple!) ; Setup with default topics (kafka-setup-simple! ["topic1"]) ; Setup with custom topics
Complete setup with simple KRaft mode. Minimal, fastest setup. Usage: (kafka-setup-simple!) ; Setup with default topics (kafka-setup-simple! ["topic1"]) ; Setup with custom topics
(kafka-setup-zookeeper!)
(kafka-setup-zookeeper! topics)
Complete setup with traditional Zookeeper mode.
Usage: (kafka-setup-zookeeper!) ; Setup with default topics (kafka-setup-zookeeper! ["topic1"]) ; Setup with custom topics
Complete setup with traditional Zookeeper mode. Usage: (kafka-setup-zookeeper!) ; Setup with default topics (kafka-setup-zookeeper! ["topic1"]) ; Setup with custom topics
(kafka-up-kraft!)
Start Kafka with KRaft mode (no Zookeeper). Modern Kafka architecture without Zookeeper dependency.
Usage: (kafka-up-kraft!) ; Start with KRaft + Kafka UI
Start Kafka with KRaft mode (no Zookeeper). Modern Kafka architecture without Zookeeper dependency. Usage: (kafka-up-kraft!) ; Start with KRaft + Kafka UI
(kafka-up-simple!)
Start Kafka with simple KRaft mode. Minimal setup, fastest startup, no UI.
Usage: (kafka-up-simple!) ; Start minimal Kafka only
Start Kafka with simple KRaft mode. Minimal setup, fastest startup, no UI. Usage: (kafka-up-simple!) ; Start minimal Kafka only
(kafka-up-zookeeper!)
Start Kafka with traditional Zookeeper mode.
Usage: (kafka-up-zookeeper!) ; Start with Zookeeper + Kafka UI
Start Kafka with traditional Zookeeper mode. Usage: (kafka-up-zookeeper!) ; Start with Zookeeper + Kafka UI
Docker compose configuration for Kafka with KRaft (no Zookeeper)
Docker compose configuration for Kafka with KRaft (no Zookeeper)
Simple Kafka KRaft configuration for quick development
Simple Kafka KRaft configuration for quick development
(list-all-topics)
List all topics in the local Kafka cluster
List all topics in the local Kafka cluster
Standard configuration for local Kafka development
Standard configuration for local Kafka development
(quick-admin)
Create an admin client for quick testing
Create an admin client for quick testing
(quick-consumer group-id)
Create a consumer client for quick testing
Create a consumer client for quick testing
(quick-producer)
Create a producer client for quick testing
Create a producer client for quick testing
(read-test-messages topic-name & [group-id])
Read messages from a topic and print them
Read messages from a topic and print them
(send-test-messages topic-name & [num-messages])
Send a few test messages to a topic
Send a few test messages to a topic
(setup-dev-topic topic-name & [options])
Create a development topic with sensible defaults
Create a development topic with sensible defaults
Consumer config for string key/value deserialization
Consumer config for string key/value deserialization
Producer config for string key/value serialization
Producer config for string key/value serialization
(wait-for-kafka)
(wait-for-kafka timeout-seconds)
Wait for Kafka to be ready by checking if we can connect. Returns true if Kafka is ready, false if timeout.
Wait for Kafka to be ready by checking if we can connect. Returns true if Kafka is ready, false if timeout.
(write-docker-compose!)
(write-docker-compose! mode-or-content)
Generate a docker-compose.yml file in the project root.
Usage: (write-docker-compose!) ; Use default (zookeeper) configuration (write-docker-compose! :kraft) ; Use KRaft mode (write-docker-compose! :simple) ; Use simple KRaft mode (write-docker-compose! custom-content) ; Use custom configuration string
Generate a docker-compose.yml file in the project root. Usage: (write-docker-compose!) ; Use default (zookeeper) configuration (write-docker-compose! :kraft) ; Use KRaft mode (write-docker-compose! :simple) ; Use simple KRaft mode (write-docker-compose! custom-content) ; Use custom configuration string
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |