IngestNode

A node that does nothing but ingest from external sources — it runs a Database per configured external source, joins leader election, and runs the source only on the database for which it's elected leader. There's no query/client surface: no pgwire, no Flight SQL — though it can serve the healthz endpoints (Config.healthz) for metrics and liveness.

Started either from YAML config (xtdb.main ingest, readConfig) with registered external sources, or embedded in a custom JVM application that supplies its own indexer programmatically. Because the configuration is handed in fresh on every boot, a programmatically-supplied external source's indexer factory needn't be serialisable — it never travels as persisted secondary-database config.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
@Serializable
class Config(var logClusters: Map<RemoteAlias, Remote.Factory<*>> = emptyMap(), var remotes: Map<RemoteAlias, Remote.Factory<*>> = emptyMap(), var databases: Map<DatabaseName, Database.Config> = emptyMap(), val memoryCache: MemoryCache.Factory = MemoryCache.Factory(), var diskCache: DiskCache.Factory? = null, var healthz: HealthzConfig? = null, val indexer: IndexerConfig = IndexerConfig(), var nodeId: String = System.getenv("XTDB_NODE_ID") ?: randomUUID().toString().takeWhile { it != '-' })

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun database(name: DatabaseName): Database?

The running Database for name, if configured — lets an embedder reach the live database, e.g. to await indexing progress or flush a block.