executeTx

abstract suspend fun executeTx(externalSourceToken: ExternalSourceToken?, systemTime: Instant? = null, writer: suspend (OpenTx) -> TxIndexer.TxResult): TransactionResult

Indexes one external-source transaction: opens an OpenTx, runs writer to populate it, then commits or aborts per the returned TxResult. Returns only once the tx is durably replicated.

externalSourceToken is persisted with the tx so the source can resume after it. systemTime defaults to the next monotonic time.

Return

the durably-replicated outcome, carrying the xtdb.api.TransactionKey assigned to the tx.