Thread safe source queue

Hello,

I would like populate elements to Source queue from many threads so I’m wondering if https://doc.akka.io/api/akka/2.5/akka/stream/scaladsl/Source$.html#queue[T](bufferSize:Int,overflowStrategy:akka.stream.OverflowStrategy):akka.stream.scaladsl.Source[T,akka.stream.scaladsl.SourceQueueWithComplete[T]] is thread safe?

If not is there any alternative that support such use case?

In Akka 2.5 Source.queue doesn’t allow for concurrent offers.

With Akka 2.6 this is now possible when maxConcurrentOffers is specified.

Source.queue(bufferSize, overflowStrategy,maxConcurrentOffers)

Cheers,
Enno.

2 Likes

Thanks will look on it!