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.