Liking cljdoc? Tell your friends :D

jackdaw.streams

Kafka streams protocols.

Kafka streams protocols.
raw docstring

aggregateclj

(aggregate kgrouped initializer-fn adder-fn)
(aggregate kgrouped initializer-fn aggregator-fn subtractor-fn-or-topic-config)
(aggregate kgrouped
           initializer-fn
           adder-fn
           subtractor-or-merger-fn
           topic-config)

Aggregates values by key into a new KTable.

Aggregates values by key into a new KTable.
sourceraw docstring

branchclj

(branch kstream predicate-fns)

Returns a list of KStreams, one for each of the predicate-fns provided.

Returns a list of KStreams, one for each of the `predicate-fns`
provided.
sourceraw docstring

closeclj

(close kafka-streams)

Stops the kafka streams.

Stops the kafka streams.
sourceraw docstring

countclj

(count kgrouped)
(count kgrouped name)

Counts the number of records by key into a new KTable.

Counts the number of records by key into a new KTable.
sourceraw docstring

filterclj

(filter kstream predicate-fn)

Creates a KStream that consists of all elements that satisfy a predicate.

Creates a KStream that consists of all elements that satisfy a predicate.
sourceraw docstring

filter-notclj

(filter-not kstream predicate-fn)

Creates a KStream that consists of all elements that do not satisfy a predicate.

Creates a KStream that consists of all elements that do not satisfy a
predicate.
sourceraw docstring

flat-mapclj

(flat-map kstream key-value-mapper-fn)

Creates a KStream that will consist of the concatenation of messages returned by calling key-value-mapper-fn on each key/value pair in the input stream.

Creates a KStream that will consist of the concatenation of messages
returned by calling `key-value-mapper-fn` on each key/value pair in the
input stream.
sourceraw docstring

flat-map-valuesclj

(flat-map-values kstream value-mapper-fn)

Creates a KStream that will consist of the concatenation of the values returned by calling value-mapper-fn on each value in the input stream.

Creates a KStream that will consist of the concatenation of the values
returned by calling `value-mapper-fn` on each value in the input stream.
sourceraw docstring

flat-transformclj

(flat-transform kstream transformer-supplier-fn)
(flat-transform kstream transformer-supplier-fn state-store-names)

Creates a KStream that consists of the results of applying the transformer to each value in the input stream. Result of the transform should be iterable, and the resulting stream is as per flatMap

Creates a KStream that consists of the results of applying the transformer
to each value in the input stream. Result of the transform should be iterable,
and the resulting stream is as per flatMap
sourceraw docstring

flat-transform-valuesclj

(flat-transform-values kstream value-transformer-supplier-fn)
(flat-transform-values kstream value-transformer-supplier-fn state-store-names)

Creates a KStream that consists of the results of applying the transformer to each value in the input stream. Result of the transform should be iterable, and the resulting stream is as per flatMap

Creates a KStream that consists of the results of applying the transformer
to each value in the input stream. Result of the transform should be iterable,
and the resulting stream is as per flatMap
sourceraw docstring

for-each!clj

(for-each! kstream foreach-fn)

Performs an action on each element of KStream.

Performs an action on each element of KStream.
sourceraw docstring

global-ktableclj

(global-ktable streams-builder topic-config)

Creates a GlobalKTable that will consist of data from the specified topic.

Creates a GlobalKTable that will consist of data from the specified
topic.
sourceraw docstring

global-ktable*clj

(global-ktable* globalktable)

Returns the underlying GlobalKTable

Returns the underlying GlobalKTable
sourceraw docstring

group-byclj

(group-by ktable key-value-mapper-fn)
(group-by ktable key-value-mapper-fn topic-config)

Groups the records of this KStream/KTable using the key-value-mapper-fn.

Groups the records of this KStream/KTable using the key-value-mapper-fn.
sourceraw docstring

group-by-keyclj

(group-by-key kstream)
(group-by-key kstream topic-config)

Groups records with the same key into a KGroupedStream.

Groups records with the same key into a KGroupedStream.
sourceraw docstring

joinclj

(join kstream-or-ktable ktable value-joiner-fn)
(join kstream-or-ktable ktable foreign-key-extractor-fn value-joiner-fn)

Combines the values of the KStream-or-KTable and the KTable that share the same key or a foreign key using an inner join.

Combines the values of the KStream-or-KTable and the KTable that
share the same key or a foreign key using an inner join.
sourceraw docstring

join-globalclj

(join-global kstream global-ktable kv-mapper joiner)

Inner-joins each record of kstream to a record in global-ktable, looking up the table by the key returned from (kv-mapper k v) and combining the values with joiner. Records with no matching table entry are dropped.

Inner-joins each record of `kstream` to a record in `global-ktable`, looking
up the table by the key returned from `(kv-mapper k v)` and combining the
values with `joiner`. Records with no matching table entry are dropped.
sourceraw docstring

join-windowedclj

(join-windowed kstream other-kstream value-joiner-fn windows)
(join-windowed kstream
               other-kstream
               value-joiner-fn
               windows
               this-topic-config
               other-topic-config)

Combines the values of two streams that share the same key using a windowed inner join.

Combines the values of two streams that share the same key using a
windowed inner join.
sourceraw docstring

kafka-streamsclj

(kafka-streams builder opts)

Makes a Kafka Streams object.

Makes a Kafka Streams object.
sourceraw docstring

kgroupedstream*clj

(kgroupedstream* kgroupedstream)

Returns the underlying KGroupedStream object.

Returns the underlying KGroupedStream object.
sourceraw docstring

kgroupedtable*clj

(kgroupedtable* kgroupedtable)

Returns the underlying KGroupedTable object.

Returns the underlying KGroupedTable object.
sourceraw docstring

kstreamclj

(kstream streams-builder topic-config)
(kstream streams-builder topic-config topic-pattern)

Creates a KStream that will consume messages from the specified topic.

Creates a KStream that will consume messages from the specified topic.
sourceraw docstring

kstream*clj

(kstream* kstream)

Returns the underlying KStream object.

Returns the underlying KStream object.
sourceraw docstring

kstreamsclj

(kstreams streams-builder topic-configs)

Creates a KStream that will consume messages from the specified topics.

Creates a KStream that will consume messages from the specified topics.
sourceraw docstring

ktableclj

(ktable streams-builder topic-config)
(ktable streams-builder topic-config store-name)

Creates a KTable that will consist of data from the specified topic.

Creates a KTable that will consist of data from the specified topic.
sourceraw docstring

ktable*clj

(ktable* ktable)

Returns the underlying KTable object.

Returns the underlying KTable object.
sourceraw docstring

left-joinclj

(left-join kstream ktable value-joiner-fn)
(left-join kstream ktable value-joiner-fn this-topic-config other-topic-config)

Creates a KStream from the result of calling value-joiner-fn with each element in the KStream and the value in the KTable with the same key.

Creates a KStream from the result of calling `value-joiner-fn` with
each element in the KStream and the value in the KTable with the same
key.
sourceraw docstring

left-join-globalclj

(left-join-global kstream global-ktable kv-mapper joiner)

Like join-global, but keeps each kstream record even when global-ktable has no entry for (kv-mapper k v), calling joiner with a nil table value.

Like `join-global`, but keeps each `kstream` record even when `global-ktable`
has no entry for `(kv-mapper k v)`, calling `joiner` with a nil table value.
sourceraw docstring

left-join-windowedclj

(left-join-windowed kstream other-kstream value-joiner-fn windows)
(left-join-windowed kstream
                    other-kstream
                    value-joiner-fn
                    windows
                    this-topic-config
                    other-topic-config)

Combines the values of two streams that share the same key using a windowed left join.

Combines the values of two streams that share the same key using a
windowed left join.
sourceraw docstring

local-threads-metadataclj

(local-threads-metadata k-streams)

Returns metadata for the locally running Kafka Streams threads.

Returns metadata for the locally running Kafka Streams threads.
sourceraw docstring

mapclj

(map kstream key-value-mapper-fn)

Creates a KStream that consists of the result of applying key-value-mapper-fn to each key/value pair in the input stream.

Creates a KStream that consists of the result of applying
`key-value-mapper-fn` to each key/value pair in the input stream.
sourceraw docstring

map-valuesclj

(map-values kstream value-mapper-fn)

Creates a KStream that is the result of calling value-mapper-fn on each element of the input stream.

Creates a KStream that is the result of calling `value-mapper-fn` on each
element of the input stream.
sourceraw docstring

mergeclj

(merge kstream other)

Merges kstream and other into a single KStream containing all of their records.

Merges `kstream` and `other` into a single KStream containing all of their
records.
sourceraw docstring

metadata-for-all-streams-clientsclj

(metadata-for-all-streams-clients k-streams)

Returns metadata for every Kafka Streams instance in the application.

Each metadata entry is a map containing host/port and the stores and partitions assigned to that instance.

Returns metadata for every Kafka Streams instance in the application.

Each metadata entry is a map containing host/port and the stores and
partitions assigned to that instance.
sourceraw docstring

metricsclj

(metrics k-streams)

Returns the Kafka Streams metrics map.

Returns the Kafka Streams metrics map.
sourceraw docstring

outer-joinclj

(outer-join ktable other-ktable value-joiner-fn)

Combines the values of two KTables that share the same key using an outer join.

Combines the values of two KTables that share the same key using an outer
join.
sourceraw docstring

outer-join-windowedclj

(outer-join-windowed kstream other-kstream value-joiner-fn windows)
(outer-join-windowed kstream
                     other-kstream
                     value-joiner-fn
                     windows
                     this-topic-config
                     other-topic-config)

Combines the values of two streams that share the same key using a windowed outer join.

Combines the values of two streams that share the same key using a
windowed outer join.
sourceraw docstring

peekclj

(peek kstream peek-fn)

Performs the action defined by peek-fn on each element of the input KStream, returning that stream untransformed.

Performs the action defined by `peek-fn` on each element of the input
KStream, returning that stream untransformed.
sourceraw docstring

print!clj

(print! kstream)

Prints the elements of the stream to out.

Prints the elements of the stream to *out*.
sourceraw docstring

process!clj

(process! kstream processor-fn state-store-names)

Applies processor-fn to each item in the input stream.

Applies `processor-fn` to each item in the input stream.
sourceraw docstring

query-metadata-for-keyclj

(query-metadata-for-key k-streams store-name key serializer)

Returns the active and standby hosts for key in store-name.

serializer is used by Kafka Streams to determine the key's partition.

Returns the active and standby hosts for `key` in `store-name`.

`serializer` is used by Kafka Streams to determine the key's partition.
sourceraw docstring

reduceclj

(reduce kgrouped reducer-fn)
(reduce kgrouped reducer-fn subtractor-fn-or-topic-config)
(reduce kgrouped adder-fn subtractor-fn topic-config)

Combines values of a stream by key into a new KTable.

Combines values of a stream by key into a new KTable.
sourceraw docstring

select-keyclj

(select-key kstream select-key-value-mapper-fn)

Create a new key from the current key and value.

select-key-value-mapper-fn should be a function that takes a key-value pair, and returns the value of the new key. Here is example multiplies each key by 10:

(fn [[k v]] (* 10 k))

Create a new key from the current key and value.

`select-key-value-mapper-fn` should be a function that takes a key-value
pair, and returns the value of the new key. Here is example multiplies each
key by 10:

```(fn [[k v]] (* 10 k))```
sourceraw docstring

set-global-state-restore-listenerclj

(set-global-state-restore-listener k-streams
                                   {:keys [on-restore-start on-batch-restored
                                           on-restore-end]})

Registers callbacks for global state-store restoration and returns k-streams.

callbacks may contain :on-restore-start, :on-batch-restored, and :on-restore-end functions. Each receives the arguments supplied by Kafka's StateRestoreListener method with the corresponding name.

Registers callbacks for global state-store restoration and returns
`k-streams`.

`callbacks` may contain `:on-restore-start`, `:on-batch-restored`, and
`:on-restore-end` functions. Each receives the arguments supplied by Kafka's
`StateRestoreListener` method with the corresponding name.
sourceraw docstring

set-state-listenerclj

(set-state-listener k-streams f)

Registers f as a Kafka Streams state listener and returns k-streams.

f is called with the new state and old state whenever the lifecycle state changes.

Registers `f` as a Kafka Streams state listener and returns `k-streams`.

`f` is called with the new state and old state whenever the lifecycle state
changes.
sourceraw docstring

set-uncaught-exception-handlerclj

(set-uncaught-exception-handler k-streams f)

Registers f as the uncaught stream-thread exception handler.

f receives the thrown Throwable and must return a StreamThreadExceptionResponse.

Registers `f` as the uncaught stream-thread exception handler.

`f` receives the thrown `Throwable` and must return a
`StreamThreadExceptionResponse`.
sourceraw docstring

source-topicsclj

(source-topics streams-builder)

Gets the names of source topics for the topology.

Gets the names of source topics for the topology.
sourceraw docstring

startclj

(start kafka-streams)

Starts processing.

Starts processing.
sourceraw docstring

stateclj

(state k-streams)

Returns the current lifecycle state of k-streams as a keyword (see state->keyword).

Returns the current lifecycle state of `k-streams` as a keyword (see
`state->keyword`).
sourceraw docstring

state->keywordclj

(state->keyword state)

Converts a KafkaStreams$State enum value to a lower-cased, dash-separated keyword (e.g. RUNNING -> :running, NOT_RUNNING -> :not-running).

Converts a KafkaStreams$State enum value to a lower-cased, dash-separated
keyword (e.g. RUNNING -> :running, NOT_RUNNING -> :not-running).
sourceraw docstring

storeclj

(store k-streams store-name)
(store k-streams store-name {:keys [partition stale-stores?]})

Returns a local read-only key/value store.

Optional options are :partition to query one partition and :stale-stores? to allow querying stale stores.

Returns a local read-only key/value store.

Optional options are `:partition` to query one partition and
`:stale-stores?` to allow querying stale stores.
sourceraw docstring

store-allclj

(store-all store)

Returns all [key value] pairs in a read-only key/value store.

Returns all `[key value]` pairs in a read-only key/value `store`.
sourceraw docstring

store-approximate-num-entriesclj

(store-approximate-num-entries store)

Returns the approximate number of entries in a read-only key/value store.

Returns the approximate number of entries in a read-only key/value `store`.
sourceraw docstring

store-getclj

(store-get store key)

Returns the value for key in a read-only key/value store.

Returns the value for `key` in a read-only key/value `store`.
sourceraw docstring

store-rangeclj

(store-range store from-key to-key)

Returns [key value] pairs in the inclusive range from-key to to-key.

Returns `[key value]` pairs in the inclusive range `from-key` to `to-key`.
sourceraw docstring

streams-builderclj

(streams-builder)

Returns a new, empty streams-builder, the entry point for defining a topology.

Returns a new, empty streams-builder, the entry point for defining a topology.
sourceraw docstring

streams-builder*clj

(streams-builder* streams-builder)

Returns the underlying KStreamBuilder.

Returns the underlying KStreamBuilder.
sourceraw docstring

streams-metadata-for-storeclj

(streams-metadata-for-store k-streams store-name)

Returns metadata for the Kafka Streams instances hosting store-name.

Returns metadata for the Kafka Streams instances hosting `store-name`.
sourceraw docstring

suppressclj

(suppress ktable suppressed)

Suppress some updates from this changelog stream

Suppress some updates from this changelog stream
sourceraw docstring

throughclj

(through kstream topic-config)

Materializes a stream to a topic, and returns a new KStream that will consume messages from the topic.

Materializes a stream to a topic, and returns a new KStream that will
consume messages from the topic.
sourceraw docstring

toclj

(to kstream topic-config)

Materializes a stream to a topic.

Materializes a stream to a topic.
sourceraw docstring

to-kstreamclj

(to-kstream ktable)
(to-kstream ktable key-value-mapper-fn)

Converts a KTable to a KStream.

Converts a KTable to a KStream.
sourceraw docstring

transformclj

(transform kstream transformer-supplier-fn)
(transform kstream transformer-supplier-fn state-store-names)

Creates a KStream that consists of the results of applying the transformer to each key/value in the input stream.

Creates a KStream that consists of the results of applying the transformer
to each key/value in the input stream.
sourceraw docstring

transform-valuesclj

(transform-values kstream value-transformer-supplier-fn)
(transform-values kstream value-transformer-supplier-fn state-store-names)

Creates a KStream that consists of the results of applying the transformer to each value in the input stream.

Creates a KStream that consists of the results of applying the transformer
to each value in the input stream.
sourceraw docstring

window-by-sessionclj

(window-by-session kgroupedstream window)

Windows the KStream

Windows the KStream
sourceraw docstring

window-by-timeclj

(window-by-time kgroupedstream window)

Windows the KStream

Windows the KStream
sourceraw docstring

with-kv-state-storeclj

(with-kv-state-store streams-builder store-config)

Adds a persistent state store to the topology with the configured name and serdes

Adds a persistent state store to the topology with the configured name
and serdes
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