=per #15441 Remove persistent stream in docs and sample

We must first release akka-stream with dependency to akka 2.3.4
and it should be maintained in the akka-release-dev branch

(cherry picked from commit a97a067701cfc527b235707882e72326277415f3)

Conflicts:
	akka-samples/akka-sample-persistence-scala/build.sbt
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
This commit is contained in:
Patrik Nordwall 2014-06-27 14:48:17 +02:00
parent 8eec3f92d3
commit bc2aeaf0d3
6 changed files with 2 additions and 168 deletions

View file

@ -475,46 +475,4 @@ trait PersistenceDocSpec {
//#view-update
}
new AnyRef {
// ------------------------------------------------------------------------------------------------
// FIXME: uncomment once going back to project dependencies (in akka-stream-experimental)
// ------------------------------------------------------------------------------------------------
/*
//#producer-creation
import org.reactivestreams.api.Producer
import akka.persistence.Persistent
import akka.persistence.stream.{ PersistentFlow, PersistentPublisherSettings }
import akka.stream.{ FlowMaterializer, MaterializerSettings }
import akka.stream.scaladsl.Flow
val materializer = FlowMaterializer(MaterializerSettings())
val flow: Flow[Persistent] = PersistentFlow.fromPersistence("some-persistence-id")
val producer: Producer[Persistent] = flow.toProducer(materializer)
//#producer-creation
//#producer-buffer-size
PersistentFlow.fromPersistence("some-persistence-id", PersistentPublisherSettings(maxBufferSize = 200))
//#producer-buffer-size
//#producer-examples
// 1 producer and 2 consumers:
val producer1: Producer[Persistent] =
PersistentFlow.fromPersistence("processor-1").toProducer(materializer)
Flow(producer1).foreach(p => println(s"consumer-1: ${p.payload}")).consume(materializer)
Flow(producer1).foreach(p => println(s"consumer-2: ${p.payload}")).consume(materializer)
// 2 producers (merged) and 1 consumer:
val producer2: Producer[Persistent] =
PersistentFlow.fromPersistence("processor-2").toProducer(materializer)
val producer3: Producer[Persistent] =
PersistentFlow.fromPersistence("processor-3").toProducer(materializer)
Flow(producer2).merge(producer3).foreach { p =>
println(s"consumer-3: ${p.payload}")
}.consume(materializer)
//#producer-examples
*/
}
}