# Thread safe source queue

**URL:** <https://discuss.akka.io/t/thread-safe-source-queue/6434>\
**Category:** Akka Streams & Alpakka\
**Created:** [May 5, 2020, 1:09pm UTC](https://discuss.akka.io/t/thread-safe-source-queue/6434 "2020-05-05T13:09:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebarys](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@sebarys](https://discuss.akka.io/u/sebarys)\
**Post date:** [May 5, 2020, 1:09pm UTC](https://discuss.akka.io/t/thread-safe-source-queue/6434/1 "2020-05-05T13:09:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ennru](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/ennru/32/1495_2.png) [@ennru](https://discuss.akka.io/u/ennru)\
**Post date:** [May 6, 2020, 6:35am UTC](https://discuss.akka.io/t/thread-safe-source-queue/6434/2 "2020-05-06T06:35:27Z")

</div>

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)](https://doc.akka.io/api/akka/2.6/akka/stream/scaladsl/Source%24.html#queue%5BT%5D(bufferSize:Int,overflowStrategy:akka.stream.OverflowStrategy,maxConcurrentOffers:Int):akka.stream.scaladsl.Source%5BT,akka.stream.scaladsl.SourceQueueWithComplete%5BT%5D%5D)

Cheers,  
Enno.

---

<div class="post-metadata">

**Author:** ![sebarys](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@sebarys](https://discuss.akka.io/u/sebarys)\
**Post date:** [May 7, 2020, 6:02am UTC](https://discuss.akka.io/t/thread-safe-source-queue/6434/3 "2020-05-07T06:02:07Z")

</div>

Thanks will look on it!
