(assign-id applicaton-id n)Assigns a deterministic :id (via gen-id) to graph node n.
Assigns a deterministic `:id` (via `gen-id`) to graph node `n`.
(assign-ids applicaton-id g)Assigns deterministic :ids to graph g and each of its nodes, then resolves
every edge's :from-id/:to-id from the node names.
Assigns deterministic `:id`s to graph `g` and each of its nodes, then resolves every edge's `:from-id`/`:to-id` from the node names.
(base-node t n)Returns the base graph fragment {:nodes :edges} for topology node n typed
t, with edges connecting it to its predecessor and successor nodes.
Returns the base graph fragment `{:nodes :edges}` for topology node `n` typed
`t`, with edges connecting it to its predecessor and successor nodes.(collapse-merge-chains g)Collapses a chain of pairwise Kafka merge nodes in graph g into a single
N-way merge, rewriting edges onto the head merge node and pruning the redundant
intermediate nodes.
Collapses a chain of pairwise Kafka merge nodes in graph `g` into a single N-way merge, rewriting edges onto the head merge node and pruning the redundant intermediate nodes.
(describe-node-dispatch n)Dispatch fn for describe-node: the lower-cased simple class name of node n
as a keyword (e.g. :source, :sink, :processor, :globalstore, :subtopology).
Dispatch fn for `describe-node`: the lower-cased simple class name of node `n` as a keyword (e.g. :source, :sink, :processor, :globalstore, :subtopology).
(describe-topology topology streams-config)Returns a list of the stream graphs in a topology.
The passed in topology object must have a describe method, meaning
it is one of:
Kafka >= 1.1 : https://kafka.apache.org/21/javadoc/org/apache/kafka/streams/Topology.html Kafka < 1.1 : https://kafka.apache.org/10/javadoc/org/apache/kafka/streams/processor/TopologyBuilder.html#internalTopologyBuilder
Each stream graph takes the form:
{:id <a unique UUID for the stream, deterministic from the encosing topology and its stream name> :type :stream :name <the name that kafka gives this stream> :nodes <a list of all the nodes in the graph> :edges <a list of all the edges in the graph>}
Nodes and edges are represented as:
{:id <a deterministic UUID for the node> :name <the name as assigned by kafka> :type <the type - processor, store, topic &c.>}
{:from <the :name of the node the edge comes from> :from-id <the :id of the node the edge comes from> :to <the :name of the node the edge goes to> :to-id <the :id of the node the edge goes to>}
All identifiers are v5 UUIDs, and are globally unique where objects are distinct and globally equal where objects are the same.
Returns a list of the stream graphs in a topology.
The passed in topology object must have a `describe` method, meaning
it is one of:
Kafka >= 1.1 : https://kafka.apache.org/21/javadoc/org/apache/kafka/streams/Topology.html
Kafka < 1.1 : https://kafka.apache.org/10/javadoc/org/apache/kafka/streams/processor/TopologyBuilder.html#internalTopologyBuilder
Each stream graph takes the form:
{:id <a unique UUID for the stream, deterministic from the encosing topology and its stream name>
:type :stream
:name <the name that kafka gives this stream>
:nodes <a list of all the nodes in the graph>
:edges <a list of all the edges in the graph>}
Nodes and edges are represented as:
{:id <a deterministic UUID for the node>
:name <the name as assigned by kafka>
:type <the type - processor, store, topic &c.>}
{:from <the :name of the node the edge comes from>
:from-id <the :id of the node the edge comes from>
:to <the :name of the node the edge goes to>
:to-id <the :id of the node the edge goes to>}
All identifiers are v5 UUIDs, and are globally unique where objects
are distinct and globally equal where objects are the same.(gen-id applicaton-id n)Returns a deterministic v5 UUID for graph node/graph n within
applicaton-id (topic nodes use a global namespace instead), so the same node
in the same application always gets the same id across describe calls and can
be merged across applications.
Returns a deterministic v5 UUID for graph node/graph `n` within `applicaton-id` (topic nodes use a global namespace instead), so the same node in the same application always gets the same id across describe calls and can be merged across applications.
(good-edge e)Returns true if edge e is not a self-loop (:from-id differs from :to-id).
Returns true if edge `e` is not a self-loop (`:from-id` differs from `:to-id`).
(is-merge? n)Returns true if node name n is a Kafka Streams merge node ("KSTREAM-MERGE...").
Returns true if node name `n` is a Kafka Streams merge node ("KSTREAM-MERGE...").
(parse-description applicaton-id d)Parses a Kafka TopologyDescription d into a sequence of id-assigned,
merge-collapsed stream graphs (one per subtopology and per global store) scoped
to applicaton-id.
Parses a Kafka `TopologyDescription` `d` into a sequence of id-assigned, merge-collapsed stream graphs (one per subtopology and per global store) scoped to `applicaton-id`.
(topic? s)Returns true if graph node s is a topic node (:type :topic).
Returns true if graph node `s` is a topic node (`:type :topic`).
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 |