# Use same ActorSource in multiple graphs

**URL:** https://discuss.akka.io/t/use-same-actorsource-in-multiple-graphs/9492
**Category:** Akka Streams & Alpakka
**Tags:** scala
**Created:** [February 7, 2022, 12:03am UTC](https://discuss.akka.io/t/use-same-actorsource-in-multiple-graphs/9492 "2022-02-07T00:03:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kibebr](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/kibebr/32/2777_2.png) [@kibebr](https://discuss.akka.io/u/kibebr)
#### Post date: [February 7, 2022, 12:03am UTC](https://discuss.akka.io/t/use-same-actorsource-in-multiple-graphs/9492/1 "2022-02-07T00:03:37Z")

</div>

Hi.

I am developing a WebSockets API.

One user can be connected in multiple devices.

The issue is that, each Websockets connection has its own graph; that means that a new ActorSource is materialized every time a user connects with another device.

I’d like to store a materialized ActorSource and reuse it across multiple Websockets connections/multiple graphs.

Is there any way I could do that?

---

<div class="post-metadata">

### Author: ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)
#### Post date: [February 11, 2022, 4:11pm UTC](https://discuss.akka.io/t/use-same-actorsource-in-multiple-graphs/9492/2 "2022-02-11T16:11:07Z")

</div>

Take a look at the [Dynamic Stream Handling part of the docs](https://doc.akka.io/docs/akka/current/stream/stream-dynamic.html#dynamic-fan-in-and-fan-out-with-mergehub-broadcasthub-and-partitionhub) and specifically the BroadcastHub
