TransportNeeds

What needs a topic transport in a node without one (TransportSelection.NONE), in words: its aggregate types routed through Kafka (wow.aggregates.[..].routing=topic), its failure ledger published to the ops context (wow.ops.publish.enabled), and the command intake (a transport's command-intake.enabled, intake). A sourced subscription or a saga's commands to another context need it too, which the node itself refuses when it is built.

The streams its contexts publish are no need: every aggregate is published by default, so a published stream says nothing of whether anyone reads it. A node without a transport publishes none of them, and says so once (unpublished, check).

Functions

Link copied to clipboard
fun check(needs: List<String>, transport: String, unpublished: List<String> = emptyList())

Refuses a node without a transport whose needs are not empty. Otherwise logs once that it runs without one: the streams it then does not publish (unpublished), and how to publish them, or that it needs none.

Link copied to clipboard
fun intake(environment: Environment, types: Collection<String>): List<String>

The keys that switch the command intake on in environment: wow.<type>.command-intake.enabled of each transport type of types it sets to true (TopicTransportOptions.COMMAND_INTAKE).

Link copied to clipboard
fun of(topicRouted: Set<AggregateType>, ledger: Boolean, intake: Collection<String>): List<String>

What needs a transport in a node with the settings given; empty for none. ledger is whether the failure ledger is published whatever the node finds (wow.ops.publish.enabled=true): auto, which publishes only while a transport has the ops context's command topic, is no need.

Link copied to clipboard
fun unpublished(manifest: Manifest, contexts: Set<String>): List<String>

The streams the contexts of manifest among contexts publish, context.aggregate, in the Manifest's order.