Package

com.rbmhtechnology.eventuate.log

cassandra

Permalink

package cassandra

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. cassandra
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class Cassandra extends Extension

    Permalink

    An Akka extension for using Apache Cassandra as event log storage backend.

    An Akka extension for using Apache Cassandra as event log storage backend. The extension connects to the configured Cassandra cluster and creates the configured keyspace if it doesn't exist yet. Keyspace auto-creation can be turned off by setting

    eventuate.log.cassandra.keyspace-autocreate = false

    The name of the keyspace defaults to eventuate and can be configured with

    eventuate.log.cassandra.keyspace = "eventuate"

    The Cassandra cluster contact points can be configured with

    eventuate.log.cassandra.contact-points = [host1[:port1], host2[:port2], ...]

    Ports are optional and default to 9042 according to

    eventuate.log.cassandra.default-port = 9042

    This extension also creates two index tables for storing replication progress data and event log indexing progress data. The names of these tables have a prefix defined by

    eventuate.log.cassandra.table-prefix = "log"

    Assuming a log prefix

    • the replication progress table name is log_rp and
    • the log indexing progress table name is log_snr.

    If two instances of this extensions are created concurrently by two different actor systems, index table creation can fail (see CASSANDRA-8387). It is therefore recommended to initialize a clean Cassandra cluster with a separate administrative application that only creates an instance of this Akka extension before creating CassandraEventLog actors. This must be done only once. Alternatively, different actor systems can be configured with different eventuate.log.cassandra.keyspace names. In this case they won't share a keyspace and index tables and concurrent initialization is not an issue.

    See also

    CassandraEventLog

  2. class CassandraEventLog extends EventLog[CassandraEventLogState]

    Permalink

    An event log actor with Apache Cassandra as storage backend.

    An event log actor with Apache Cassandra as storage backend. It uses the Cassandra extension to connect to a Cassandra cluster. Applications should create an instance of this actor using the props method of the CassandraEventLog companion object.

    val factory: ActorRefFactory = ... // ActorSystem or ActorContext
    val logId: String = "example"      // Unique log id
    
    val log = factory.actorOf(CassandraEventLog.props(logId))

    Each event log actor creates two tables in the configured keyspace (see also Cassandra). Assuming the following table prefix

    eventuate.log.cassandra.table-prefix = "log"

    and a log id with value example, the names of these two tables are

    • log_example which represents the local event log.
    • log_example_agg which is an index of the local event log for those events that have non-empty destinationAggregateIds set. It is used for fast recovery of event-sourced actors, views, stateful writers and processors that have an aggregateId defined.
    See also

    DurableEvent

    Cassandra

  3. class CassandraEventLogSettings extends EventLogSettings

    Permalink
  4. case class CassandraEventLogState(eventLogClock: EventLogClock, eventLogClockSnapshot: EventLogClock, deletionMetadata: DeletionMetadata) extends EventLogState with Product with Serializable

    Permalink

    Internal state of CassandraEventLog.

Value Members

  1. object Cassandra extends ExtensionId[Cassandra] with ExtensionIdProvider

    Permalink
  2. object CassandraEventLog

    Permalink
  3. implicit def listenableFutureToFuture[A](lf: ListenableFuture[A])(implicit executionContext: ExecutionContext): Future[A]

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped