While using akka-stream-alpakka-xml with akka http requests, I noticed interesting behavior when parsing large xml files.
Detailed scenario is as follows:
- user posts xml file using akka http endpoint
- xml is then taken from request entity as bytestring source and parsed by XmlParsing.parser
XmlParsing logic works with the same xml without akka http, or when I first materialize it by Unmarshal(httpRequest.entity).to[String] and pass it as Source.single(Bytestring) to XmlParsing.parser.
When I run source.via(XmlParsing.parser), where source is from akka http request (request.entity.dataBytes), I almost always see that some keys from xml are splitted:
I susspect that this is related to fact that parsing is faster then source?
What do you think?