PublishedSinks

class PublishedSinks(published: Map<String, List<PublishedManifest>>, processor: String, sinkOf: (context: String, stream: PublishedManifest) -> Sink)

The built-in sink subscriptions of a node: one SinkSubscription per stream a context publishes (published, by context: the Manifest's published), named <processor>.<aggregate>, each writing to the sink sinkOf gives its stream, with or without the state as the stream says (PublishedManifest.includeState).

The host gives it to the node through its factory, beside the application's subscriptions (a Spring host does so for every PublishedSinks bean): each sink subscription is one of its context's state readers, under its own name, of its aggregate type, so the context's executor keeps the views it reads. A context that publishes an aggregate it has no model of fails the node's assembly.

Constructors

Link copied to clipboard
constructor(published: Map<String, List<PublishedManifest>>, processor: String, sinkOf: (context: String, stream: PublishedManifest) -> Sink)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The sinks as the node takes them: a SubscriptionFactory of one sink subscription per published stream.

Functions

Link copied to clipboard

The name of the subscription that publishes stream: <processor>.<aggregate>.

Link copied to clipboard
open override fun toString(): String