io.bidmachine.protobuf.vectorid.cdc.v1

Members list

Type members

Classlikes

sealed abstract class CDCOperation(val value: Int) extends GeneratedEnum

Type of operation performed on vertices in this state entry. Ordered by application precedence: DELETE → SPLIT → UNION → APPEND → ALIVE.

Type of operation performed on vertices in this state entry. Ordered by application precedence: DELETE → SPLIT → UNION → APPEND → ALIVE.

Attributes

Companion
object
Supertypes
trait GeneratedEnum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object ALIVE
object APPEND
object DELETE
trait Recognized
object SPLIT
object UNION
class Unrecognized
Show all
object CDCOperation extends GeneratedEnumCompanion[CDCOperation]

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
trait GeneratedEnumCompanion[CDCOperation]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class CDCSequence(state: Seq[CDCState], commitId: ByteString, commitTimestamp: Long, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[CDCSequence]

A grouped set of all operations that affect a cluster of related vector_ids in a single processing run.

A grouped set of all operations that affect a cluster of related vector_ids in a single processing run.

Operations within state are ordered by type: DELETE → SPLIT → UNION → APPEND → ALIVE. All entries share connected vector_ids — if operation A references vector_id X and operation B references vector_id X (as either vector_id or prev_vector_id), they belong to the same CDCSequence.

Example — Ultimate scenario (one Kafka message): state = [ { operation: DELETE, prev_vector_id: a, user_id: [ifv_dead] }, { operation: SPLIT, vector_id: d, prev_vector_id: a, user_id: [ifv1] }, { operation: SPLIT, vector_id: e, prev_vector_id: b, user_id: [ifv3] }, { operation: UNION, vector_id: c, prev_vector_id: a, user_id: [ifv2] }, { operation: UNION, vector_id: c, prev_vector_id: b, user_id: [ifv4] }, { operation: APPEND, vector_id: c, user_id: [ifv_new] }, ]

Example — ALIVE heartbeat (separate message, no structural changes): state = [ { operation: ALIVE, vector_id: a }, ]

Value parameters

commitId

Meta information for debugging and metrics, shows which run the changes were pulled from

commitTimestamp

Run batch processing completion time

state

Chronologically ordered state changes (DELETE → SPLIT → UNION → APPEND → ALIVE)

Attributes

Companion
object
Supertypes
trait Updatable[CDCSequence]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CDCSequence extends GeneratedMessageCompanion[CDCSequence]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[CDCSequence]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
final case class CDCState(vectorId: Option[ByteString], prevVectorId: Option[ByteString], userId: Seq[ByteString], operation: CDCOperation, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[CDCState]

A single state change entry within a CDC message. Represents one operation affecting a set of IFA/IFV vertices.

A single state change entry within a CDC message. Represents one operation affecting a set of IFA/IFV vertices.

Field presence by operation: DELETE: prev_vector_id + user_id SPLIT: vector_id + prev_vector_id + user_id UNION: vector_id + prev_vector_id + user_id APPEND: vector_id + user_id ALIVE: vector_id only (TTL heartbeat, no user_id changes)

Value parameters

operation

The operation that produced this state change

prevVectorId

Previous vector UUID before the operation. Present for DELETE, UNION, SPLIT. Absent for APPEND, ALIVE.

userId

List of IFA/IFV source IDs affected by this state change. Present for DELETE, SPLIT, UNION, APPEND. Empty for ALIVE (no mapping changes).

vectorId

Vector UUID after the operation. Present for APPEND, UNION, SPLIT, ALIVE. Absent for DELETE.

Attributes

Companion
object
Supertypes
trait Updatable[CDCState]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CDCState extends GeneratedMessageCompanion[CDCState]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[CDCState]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
CDCState.type
object CdcProto extends GeneratedFileObject

Attributes

Supertypes
class GeneratedFileObject
class Object
trait Matchable
class Any
Self type
CdcProto.type
final case class VectorIdStateSnapshot(vectorId: ByteString, prevVectorId: Seq[ByteString], userId: Seq[ByteString], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[VectorIdStateSnapshot]

The state we broadcast for streaming API Examples: Split: prev run: vector_id = 1; prev_vector_id = [ ]; user_id = [a, b, c, d, e] - original entity curr run: vector_id = 11; prev_vector_id = [1]; user_id = [a, b, c] - a message of split curr run: vector_id = 12; prev_vector_id = [1]; user_id = [d, e] - another message of split

The state we broadcast for streaming API Examples: Split: prev run: vector_id = 1; prev_vector_id = [ ]; user_id = [a, b, c, d, e] - original entity curr run: vector_id = 11; prev_vector_id = [1]; user_id = [a, b, c] - a message of split curr run: vector_id = 12; prev_vector_id = [1]; user_id = [d, e] - another message of split

Merge: prev run: vector_id = 11; prev_vector_id = [1]; user_id = [a, b] - original entity prev run: vector_id = 39; prev_vector_id = [3]; user_id = [e, f] - original entity curr run: vector_id = 45; prev_vector_id = [11, 39]; user_id = [a, b, e, f] - a message of merge

Append: prev run: vector_id = 15; prev_vector_id = [1]; user_id = [a, b] - original entity curr run: vector_id = 15; prev_vector_id = [15]; user_id = [a, b, h] - a message of append

Create: curr run: vector_id = 99; prev_vector_id = [ ]; user_id = [e, i, o] - a message of create

Value parameters

prevVectorId

List of previous vector ids, can be empty

userId

List of source ids (ifa/ifv/...), can't be empty

vectorId

An actual vector id

Attributes

Companion
object
Supertypes
trait Updatable[VectorIdStateSnapshot]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object VectorIdStateSnapshot extends GeneratedMessageCompanion[VectorIdStateSnapshot]

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
trait GeneratedMessageCompanion[VectorIdStateSnapshot]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type