Skip to content

Files

Latest commit

fca5aba · Oct 16, 2016

History

History
This branch is 2 commits ahead of, 2810 commits behind akka/alpakka:main.

cassandra

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 13, 2016
Sep 20, 2016
Oct 16, 2016

This project provides a way to transform a Cassandra's ResultSet into a Akka Stream's Source.

Example:

import akka.actor.ActorSystem
import akka.actor.stream.ActorMaterializer
import akka.stream.contrib.cassandra.CassandraSource
import com.datastax.driver.core.{SimpleStatement, Cluster}

implicit val system = ActorSystem()
implicit val mat = ActorMaterializer()

val cluster = Cluster.builder.addContactPoint("127.0.0.1").withPort(9042).build
implicit val session = cluster.connect()

val stmt = new SimpleStatement("SELECT * FROM akka_stream_test.test")

val cassSource: Source[Row, NotUsed] = CassandraSource(stmt)