Remove simple line parsing, exposing explicit delimiter stage instead
This commit is contained in:
parent
79e24c5976
commit
8702f09f10
7 changed files with 21 additions and 33 deletions
|
|
@ -22,7 +22,8 @@ class RecipeParseLines extends RecipeSpec {
|
|||
|
||||
//#parse-lines
|
||||
import akka.stream.io.Framing
|
||||
val linesStream = rawData.via(Framing.lines("\r\n", maximumLineBytes = 100))
|
||||
val linesStream = rawData.via(
|
||||
Framing.delimiter(ByteString("\r\n"), maximumFrameLength = 100, allowTruncation = true)).map(_.utf8String)
|
||||
//#parse-lines
|
||||
|
||||
Await.result(linesStream.grouped(10).runWith(Sink.head), 3.seconds) should be(List(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue