Skip to content
Streaming library for old versions of Cassandra
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
doc
example/src/main
lib/src
project
.gitignore
.scalafmt.conf
.travis.yml
LICENSE
PITCHME.md
PITCHME.yaml
README.md
build.sbt
scalastyle-config.xml

README.md

akka-stream-cassandra

Build Status Coverage Status Download Scaladoc

Akka Stream based library for unsupported and no longer maintained versions of Cassandra and DataStax Enterprise powered by Netflix Astyanax

Please prefer alpakka Cassandra Connector for version 2 and above

Have a look at the presentation of this lightning talk about Cassandra migration to understand the reason behind this library

Setup

Add the jcenter repository in your build definition and import the latest stable version

resolvers += Resolver.jcenterRepo

libraryDependencies ++= Seq(
  "com.github.niqdev" %% "akka-stream-cassandra" % "0.7.5"
    // you might prefer to use a different version
    exclude("com.netflix.astyanax", "astyanax")
)

Example

implicit val actorSystem: ActorSystem = ActorSystem("actor-system")
implicit val materializer: ActorMaterializer = ActorMaterializer()
implicit val executionContext: ExecutionContext = actorSystem.dispatcher

val keyspace: Keyspace = ...
val columnFamily: ColumnFamily[String, String] = ...

CassandraSource(keyspace, columnFamily)
  .via(...)
  .runForeach { row =>
    log.debug(s"row: ${row.getKey}")
  }

Refer to the test for a full example with EmbeddedCassandra

You can’t perform that action at this time.