# Help regarding IMediaStreamNameAliasProvider2

**URL:** <https://community.wowza.com/t/help-regarding-imediastreamnamealiasprovider2/43650>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [April 6, 2015, 4:24pm UTC](https://community.wowza.com/t/help-regarding-imediastreamnamealiasprovider2/43650 "2015-04-06T16:24:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [April 6, 2015, 4:24pm UTC](https://community.wowza.com/t/help-regarding-imediastreamnamealiasprovider2/43650/1 "2015-04-06T16:24:41Z")

</div>

Hi ,

My Setup consists of multiple origin servers and multiple edge servers . A stream can go to any of the origin servers . And when published reconnects the origin server might change (depending of loadbalancer). So on Edge Application i have a custom module which uses IMediaStreamNameAliasProvider2 interface and this helps to resolve streams to proper origin servers. I have kep my code in the following method.

public String resolveStreamAlias(IApplicationInstance appInstance, String name, IMediaCaster mediaCaster).

this method recieves “wowz://localhost:1935/live/_definst_/myStream” as name and it return “wowz://originIp:1935/live/_definst_/myStream” . Problem with this approach comes when origin server changes for any stream . I have observed that Edge applications give call to resolveStreamAlias only once in their lifetime for any particular stream Hence they continue to pull stream from old origin server . How to make sure that Edge applications always finds proper origin server url for pulling streams.

-Gaurav

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [April 10, 2015, 11:43am UTC](https://community.wowza.com/t/help-regarding-imediastreamnamealiasprovider2/43650/2 "2015-04-10T11:43:28Z")

</div>

Hi Guarav,

We have received your ticket regarding this and will follow up with you via that process.

Paul
