Some handy functions for use in the repl.
Some handy functions for use in the repl.
(admin-config)
(admin-config bootstrap-servers)
Convenient helper for building an admin config map given optional bootstrap servers string.
Convenient helper for building an admin config map given optional bootstrap servers string.
(consumer-config)
(consumer-config bootstrap-servers)
(consumer-config bootstrap-servers group-id)
Convenient helper for building a consumer config map given optional bootstrap servers string and group id.
group-id
defaults to a random UUID.
bootstrap-servers
defaults to default port on localhost.
Convenient helper for building a consumer config map given optional bootstrap servers string and group id. `group-id` defaults to a random UUID. `bootstrap-servers` defaults to default port on localhost.
(create-topic admin-config topic-config)
Creates a Kafka topic.
Creates a Kafka topic.
(get-keyvals consumer-config topic-config)
(get-keyvals consumer-config topic-config polling-interval-ms)
Takes a consumer config and topic config, consumes from a Kafka topic, and returns a seq of key-value pairs.
Takes a consumer config and topic config, consumes from a Kafka topic, and returns a seq of key-value pairs.
(get-records consumer-config topic-config)
(get-records consumer-config topic-config polling-interval-ms)
Takes a consumer config and topic config, consumes from a Kafka topic, and returns a seq of maps.
Takes a consumer config and topic config, consumes from a Kafka topic, and returns a seq of maps.
(list-topics admin-config)
Returns a list of Kafka topics.
Returns a list of Kafka topics.
(producer-config)
(producer-config bootstrap-servers)
Convenient helper for building a producer config map given optional bootstrap servers string.
Convenient helper for building a producer config map given optional bootstrap servers string.
(publish producer-config topic-config value)
(publish producer-config topic-config key value)
(publish producer-config topic-config partition key value)
Takes a producer config, topic config and record value, and (optionally) a key and partition number, and produces to a Kafka topic.
Takes a producer config, topic config and record value, and (optionally) a key and partition number, and produces to a Kafka topic.
(topic-exists? admin-config topic-config)
Returns true if the topic exists.
Returns true if the topic exists.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close