[akka-user][deprecated] akka use iterator outofMemory

2018-11-08 Thread 491537461q
Hello,Every Hacker: I am a junior software engineer. I tried to rewrite Stream as a sink and found that when I read a large update of the database, I throw an exception OutOfMemory. Can anyone give me some advice? Why am I wrong, thanks :-) def run(url: String, user: String, password: String,

[akka-user][deprecated] how to use backpressure in iterator?

2018-11-13 Thread 491537461q
object stream2iter extends Iterator[(LogSequenceNumber, String)] { override def next: (LogSequenceNumber, String) = { try { val msg = stream.read //println(msg) val offset = msg.arrayOffset val src = msg.array val len = src.length - offset

[akka-user][deprecated] confuse about source.tick

2019-02-11 Thread 491537461q
object Test extends App { implicit val sys = ActorSystem("streamSys") implicit val ec = sys.dispatcher implicit val mat = ActorMaterializer( ActorMaterializerSettings(sys) .withInputBuffer(1,1) ) case class Tick() RunnableGraph.fromGraph(GraphDSL.create() { implicit b =>