Liking cljdoc? Tell your friends :D

kafka-metamorphosis.streams

Kafka Streams wrapper for Kafka Metamorphosis.

Kafka Streams wrapper for Kafka Metamorphosis.
raw docstring

aggregateclj

(aggregate grouped-stream init-fn agg-fn)
(aggregate grouped-stream init-fn agg-fn store-name)

Aggregate values per key in a grouped (or windowed) stream. init-fn is a no-arg function producing the initial aggregate value. agg-fn is a function of [key value aggregate] -> new-aggregate. Returns a KTable.

Aggregate values per key in a grouped (or windowed) stream.
init-fn is a no-arg function producing the initial aggregate value.
agg-fn is a function of [key value aggregate] -> new-aggregate.
Returns a KTable.
sourceraw docstring

branchclj

(branch stream predicates)

Split a KStream into multiple streams using a sequence of predicate functions. Returns a vector of KStreams in the same order as predicates.

Split a KStream into multiple streams using a sequence of predicate functions.
Returns a vector of KStreams in the same order as predicates.
sourceraw docstring

build-topologyclj

(build-topology builder)

Build a Topology from a StreamsBuilder.

Build a Topology from a StreamsBuilder.
sourceraw docstring

clean-up!clj

(clean-up! streams)

Clean up local state for the Kafka Streams instance.

Clean up local state for the Kafka Streams instance.
sourceraw docstring

close!clj

(close! streams)
(close! streams timeout-ms)

Close the Kafka Streams instance. Optionally provide a timeout in milliseconds.

Close the Kafka Streams instance.
Optionally provide a timeout in milliseconds.
sourceraw docstring

count-valuesclj

(count-values grouped-stream)
(count-values grouped-stream store-name)

Count records per key in a grouped (or windowed) stream, returning a KTable.

Count records per key in a grouped (or windowed) stream, returning a KTable.
sourceraw docstring

createclj

(create topology config)

Create a KafkaStreams instance from an existing Topology and config map.

Create a KafkaStreams instance from an existing Topology and config map.
sourceraw docstring

create-builderclj

(create-builder)

Create a new Kafka Streams builder.

Create a new Kafka Streams builder.
sourceraw docstring

create-from-builderclj

(create-from-builder builder config)

Create a KafkaStreams instance from a StreamsBuilder and config map.

Create a KafkaStreams instance from a StreamsBuilder and config map.
sourceraw docstring

default-application-idclj

Default Kafka Streams application id.

Default Kafka Streams application id.
sourceraw docstring

filter-streamclj

(filter-stream stream pred)

Filter records from a KStream using a predicate function of [key value].

Filter records from a KStream using a predicate function of [key value].
sourceraw docstring

flat-map-kvclj

(flat-map-kv stream f)

Transform each [key value] pair of a KStream into zero or more [key value] pairs using f, a function of [key value] that returns a sequence of pairs.

Transform each [key value] pair of a KStream into zero or more [key value] pairs
using f, a function of [key value] that returns a sequence of pairs.
sourceraw docstring

global-tableclj

(global-table builder topic)
(global-table builder topic {:keys [store]})

Create a GlobalKTable from a builder and a topic. Pass a :store name to make the underlying state store queryable via query.

Create a GlobalKTable from a builder and a topic.
Pass a :store name to make the underlying state store queryable via `query`.
sourceraw docstring

groupclj

(group stream)

Group a KStream by its existing key, returning a KGroupedStream.

Group a KStream by its existing key, returning a KGroupedStream.
sourceraw docstring

group-by-keyclj

(group-by-key stream f)

Group a KStream by a new key computed from [key value] using f, returning a KGroupedStream.

Group a KStream by a new key computed from [key value] using f,
returning a KGroupedStream.
sourceraw docstring

joinclj

(join stream ktable value-joiner-fn)

Inner join a KStream with a KTable using value-joiner-fn, a function of [stream-value table-value] -> joined-value.

Inner join a KStream with a KTable using value-joiner-fn,
a function of [stream-value table-value] -> joined-value.
sourceraw docstring

left-joinclj

(left-join stream ktable value-joiner-fn)

Left join a KStream with a KTable using value-joiner-fn, a function of [stream-value table-value] -> joined-value. table-value is nil when there is no match.

Left join a KStream with a KTable using value-joiner-fn,
a function of [stream-value table-value] -> joined-value.
table-value is nil when there is no match.
sourceraw docstring

map-kvclj

(map-kv stream f)

Transform both key and value of a KStream using f, a function of [key value] that returns a [new-key new-value] pair.

Transform both key and value of a KStream using f, a function of [key value]
that returns a [new-key new-value] pair.
sourceraw docstring

map-valuesclj

(map-values stream f)

Transform the values of a KStream using f.

f receives the current value and should return the transformed value.

Transform the values of a KStream using f.

f receives the current value and should return the transformed value.
sourceraw docstring

queryclj

(query streams store-name key)

Query a key-value state store by key from a running KafkaStreams instance. store-name must match a :store name passed to table, global-table, count-values, reduce-values, or aggregate.

Query a key-value state store by key from a running KafkaStreams instance.
store-name must match a :store name passed to `table`, `global-table`,
`count-values`, `reduce-values`, or `aggregate`.
sourceraw docstring

reduce-valuesclj

(reduce-values grouped-stream f)
(reduce-values grouped-stream f store-name)

Reduce values per key in a grouped (or windowed) stream using f, a function of [aggregate value] -> new-aggregate. Returns a KTable.

Reduce values per key in a grouped (or windowed) stream using f,
a function of [aggregate value] -> new-aggregate. Returns a KTable.
sourceraw docstring

start!clj

(start! streams)

Start the Kafka Streams instance.

Start the Kafka Streams instance.
sourceraw docstring

stateclj

(state streams)

Return the current Kafka Streams state.

Return the current Kafka Streams state.
sourceraw docstring

stop!clj

(stop! streams)
(stop! streams timeout-ms)

Stop the Kafka Streams instance. Alias for close!.

Stop the Kafka Streams instance. Alias for `close!`.
sourceraw docstring

streamclj

(stream builder topics)

Create a KStream from a builder and a topic or list of topics.

Create a KStream from a builder and a topic or list of topics.
sourceraw docstring

streams-configclj

(streams-config)
(streams-config application-id)
(streams-config application-id overrides)

Create a Kafka Streams configuration map with sensible defaults.

Usage: (streams-config) ; local brokers and default application id (streams-config "my-app") ; custom application id (streams-config "my-app" {:bootstrap-servers "kafka:9092"})

Create a Kafka Streams configuration map with sensible defaults.

Usage:
(streams-config)                             ; local brokers and default application id
(streams-config "my-app")                  ; custom application id
(streams-config "my-app" {:bootstrap-servers "kafka:9092"})
sourceraw docstring

tableclj

(table builder topic)
(table builder topic {:keys [store]})

Create a KTable from a builder and a topic. Pass a :store name to make the underlying state store queryable via query.

Create a KTable from a builder and a topic.
Pass a :store name to make the underlying state store queryable via `query`.
sourceraw docstring

toclj

(to stream topic)

Send a KStream to the given topic and return the same stream.

Send a KStream to the given topic and return the same stream.
sourceraw docstring

windowclj

(window grouped-stream size-ms)

Apply a tumbling time window of the given size (in milliseconds) to a KGroupedStream, returning a TimeWindowedKStream.

Apply a tumbling time window of the given size (in milliseconds) to a
KGroupedStream, returning a TimeWindowedKStream.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close