Package-level declarations

Types

Link copied to clipboard
class Envelope @InternalWowApi constructor(val kind: EnvelopeKind, val id: String, val type: String, val payload: JsonNode, val transport: Transport? = null, val format: Int = FORMAT)

A message of a Kafka topic: {format, kind, id, type, payload, transport}.

Link copied to clipboard

Reads and writes Envelopes as the JSON value of a Kafka message, with Wow's mapper (WowJson): every number of a payload or a state keeps its exact value and scale, and the modules are fixed, so the wire form does not depend on what a host brings.

Link copied to clipboard

The headers of a Kafka message, each repeating a field of its Envelope.

Link copied to clipboard

What an Envelope carries, by its wire name (WireNames), the kind of the value and the wow-kind header: STATE_EVENT is state-event.

Link copied to clipboard

Reads the partitions of a topic from an offset: the port a Kafka-sourced subscription reads through. The runtime assigns the partitions to nodes by its own leases and keeps the offsets in its checkpoint store, so a source has no consumer group, commits nothing and keeps no position: each read starts where it is told.

Link copied to clipboard
class PartitionOffsets @InternalWowApi constructor(val start: Long, val end: Long)

The offsets a partition holds: from start, the first one still retained, to before end, the offset the next message written will get. A partition holds nothing when they are equal.

Link copied to clipboard
class SourceMessage @InternalWowApi constructor(val offset: Long, val key: String?, val headers: Map<String, String>, val value: ByteArray)

A message read from a partition of a topic at its offset, with its key (null when it has none).

Link copied to clipboard
interface TopicAdmin

Describes and creates the topics of a broker: the port the runtime validates and creates a node's topics through at its start, as wow.kafka.ddl says. Neither call creates a topic as a side effect of asking about it.

Link copied to clipboard
class TopicMessage @InternalWowApi constructor(val key: String, val value: ByteArray, val headers: Map<String, String> = emptyMap(), val partition: Int? = null)

A message to write to a topic: its key, which picks its partition (the same key always lands in the same partition, so the messages of one key keep their order), its headers and its value bytes.

Link copied to clipboard

Writes messages to the topics of a broker: the port of the Kafka transport, which an in-memory transport also implements so the runtime's semantics are tested without a broker.

Link copied to clipboard

One open topic transport: the producer the node sends through, the source its sourced subscriptions read, and the admin it describes and creates its topics with. close closes them, after the node has stopped.

Link copied to clipboard

The settings every topic transport has, whatever its type (wow.<type>.*): how the node names and uses its topics, not how a client reaches its brokers. The host reads them for the node's topics; a transport's options add them to its own (TransportProvider.options), so no transport declares them again or forgets one.

Link copied to clipboard
class TransportConfig @InternalWowApi constructor(val name: String, val type: String, val options: Map<String, String> = emptyMap(), val resources: StoreResources = StoreResources.NONE, val development: Boolean = false, val observer: Observer = Observer.NONE)

What a TransportProvider opens a transport from: its name and type, its own settings (options, each key relative to the transport's configuration, bootstrap-servers say), the application's resources, and whether the node runs for development (a profile of wow.dev-profiles is active, or its internal port binds a loopback address alone): a provider may say less then.

Link copied to clipboard

A topic transport: what opens the broker a node's published streams, its commands to other contexts and their receipts go through. Wow's Kafka transport (kafka) is a provider as a community one, a Pulsar transport say, is: the host finds them on the classpath (ServiceLoader, from the module's META-INF/services/me.ahoo.wow.spi.transport.TransportProvider) and among the application's beans, a bean taking the place of a provider of its type on the classpath, as it finds a me.ahoo.wow.spi.store.StoreProvider.

Link copied to clipboard

A transport refused a message as it is, for good: a record beyond the broker's size limit, a topic name it does not take, a record it calls invalid. Sending it again fails the same way, so it is never retried: a subscription parks the aggregate at once, with this as the reason.

Link copied to clipboard

A transport a port called could not be reached, or did not answer in time: a broker, leader or coordinator not available, a network failure, too few replicas in sync, a request that timed out. The same call may succeed once the transport is back.