SourceTopics

class SourceTopics @InternalWowApi constructor(val source: PartitionedSource, val prefix: String = "", val producer: TopicProducer? = null, val intake: Boolean = false, val admin: TopicAdmin? = null, val ddl: Ddl = Ddl.NONE, val partitionRefresh: Duration = DEFAULT_PARTITION_REFRESH)

The topics of a node's broker, each named after prefix, the prefix every service on the broker writes under:

  • Published streams: the node reads other contexts' streams from source, each topic named as the publishing context's Manifest names it (PublishedManifest.topic, topicOf). Partitions added to a topic it reads are read too, within partitionRefresh of the source seeing them.

  • Commands across contexts, with a producer: a saga's command to an aggregate of a context outside its own is sent to that context's command topic, wow.<context>.commands (commandsOf), and the receipts of those another context rejects are read from the saga's context's receipts topic, wow.<context>.receipts (receiptsOf).

  • Command intake, when intake is set: each context the node hosts executes the commands of its command topic, whose partitions must be its log's, and sends the receipts of those it rejects through producer.

  • Topic management: at its start, the node validates or creates the topics its contexts own as ddl says, through admin, which any ddl but Ddl.NONE needs.

Constructors

Link copied to clipboard
constructor(source: PartitionedSource, prefix: String = "", producer: TopicProducer? = null, intake: Boolean = false, admin: TopicAdmin? = null, ddl: Ddl = Ddl.NONE, partitionRefresh: Duration = DEFAULT_PARTITION_REFRESH)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val ddl: Ddl
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun commandsOf(context: String): String

The command topic of context.

Link copied to clipboard
fun copyWith(source: PartitionedSource = this.source, prefix: String = this.prefix, producer: TopicProducer? = this.producer, intake: Boolean = this.intake, admin: TopicAdmin? = this.admin, ddl: Ddl = this.ddl, partitionRefresh: Duration = this.partitionRefresh): SourceTopics

This SourceTopics with the given fields replaced: Wow's own copy, left out of the ABI.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun receiptsOf(context: String): String

The receipts topic of context.

Link copied to clipboard
fun topicOf(topic: String): String

The topic of a stream the Manifest publishes on topic.

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