How to use multiple frame delimiters in akka stream tcp?

Hi!

I am using akka streams tcp module for handling some tcp protocol connection. And I would like to be able to specify multiple frame delimiters. Unfortunately I didn’t find a way how to achieve that. akka.stream.scaladsl.Framing.delimiter takes only single ByteString delimiter as an argument.

It seems to be quite common problem. For example netty defaults to using “\r\n” and “\n” as allowed line delimiters.
https://netty.io/4.0/api/io/netty/handler/codec/DelimiterBasedFrameDecoder.html

I don’t think we have heard any requests for this before but it makes sense. Please open an issue over in the Akka issue tracker, or even better an issue and PR added support for this if you are up for that. :)

1 Like

Thanks for a quick reply!
I will create a PR somewhere soon then.