I am using akka-streams and I hit an exception because of maxing out the Http Pool on akka-http. There is a Source of list-elements, which get split and thus transformed to SubFlows. The SubFlows issue http requests. Although I put a buffer on the SubFlow, it seems the buffer takes effect per SubFlow. Is there a way to have a buffer based on the Source that takes effect on the SubFlows?
Asked
Active
Viewed 68 times
1 Answers
0
My mistake was that I was merging the substreams without taking into consideration the parallelism by using
def mergeSubstreams(): Flow[In, Out, Mat]
From the documentation
This is identical in effect to
mergeSubstreamsWithParallelism(Integer.MAX_VALUE)
.
Thus my workaround was to use
def mergeSubstreamsWithParallelism(parallelism: Int): Flow[In, Out, Mat]

gkatzioura
- 2,655
- 2
- 26
- 39