# How to stop liverepeater-edge stream from Java?

**URL:** <https://community.wowza.com/t/how-to-stop-liverepeater-edge-stream-from-java/40556>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [July 31, 2014, 12:25am UTC](https://community.wowza.com/t/how-to-stop-liverepeater-edge-stream-from-java/40556 "2014-07-31T00:25:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Tsessarskiy](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Alexey\_Tsessarskiy](https://community.wowza.com/u/Alexey_Tsessarskiy)\
**Post date:** [July 31, 2014, 12:25am UTC](https://community.wowza.com/t/how-to-stop-liverepeater-edge-stream-from-java/40556/1 "2014-07-31T00:25:49Z")

</div>

Hi!

There is a stream running through edge application. How can we stop it from java? Stream source is provided by AliasProvider, so it wont launch again as AliasProvider will return wrong URL upon future client requests. But those who were already connected while it had proper alias resolve, keep watching it. Stream is not in MediaCasterStreamManager, we cant stop it from there.

We need to stop the stream, disconnect all clients connected to this stream, and completely purge it from edge application.

Any advice?

Many thanks, Alex.

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [July 30, 2014, 9:36pm UTC](https://community.wowza.com/t/how-to-stop-liverepeater-edge-stream-from-java/40556/2 "2014-07-30T21:36:44Z")

</div>

Hello Alex,

If you are looking for some code to get you started in that direction, I’d suggest viewing our [ModuleTimeDisconnect](https://www.wowza.com/docs/how-to-disconnect-connected-clients-after-a-specified-time-period-moduletimeddisconnect) module in our collection. Take a look at the Disconnecter class as it demonstrates how to disconnect clients and you could use that as a starter for your new module.

Otherwise you can control the process by which the edge resolves the stream. Take a look at our event listeners for [IMediaStreamNameAliasProvider2](https://www.wowza.com/docs/how-to-use-event-listeners-in-wowza-media-server#IMediaStreamNameAliasProvider2) interface. You can then make the determination of which streams are to be resolved by the respective origin(s) by handling the resolvePlayAlias and/or resolveStreamAlias events.

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [August 4, 2014, 3:43am UTC](https://community.wowza.com/t/how-to-stop-liverepeater-edge-stream-from-java/40556/3 "2014-08-04T03:43:33Z")

</div>

Hello Alex

That in conjunction with handling future requests via the IMediaStreamNameAliasProvider2 (as you are already) should handle it.

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![Alexey\_Tsessarskiy](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@Alexey\_Tsessarskiy](https://community.wowza.com/u/Alexey_Tsessarskiy)\
**Post date:** [July 31, 2014, 11:17am UTC](https://community.wowza.com/t/how-to-stop-liverepeater-edge-stream-from-java/40556/4 "2014-07-31T11:17:53Z")

</div>

Hello Matt,

we already have IMediaStreamNameAliasProvider2 implemented, so we do control the way streams are resolved. But not resolving stream does not help with one that was already resolved and is being played. Do you say proper way to stop it is to just go through the clients/sessions and disconnect/shutdown everybody connected to this stream?

Thanks,

Alex.
