I corrected previous to show the Alias API rather than MediaCaster API, but you will need that, or the alias addon, too.
You need to alias the stream URLs for most players and most uses. A URL stream name will work in Wowza test players, but not in most or any commercial players.
This is what you need to do:
UDP/RTSP source > pull with Wowza MediaCaster > Alias (addon or api) resolver > Stream Class Publisher.
To support the above with the StreamNameAlias addon, you would have a rule in the stream alias file like this:
String streamname = "udpsource"
MediaCasterStreamMap mediaCasterMap = appInstance.getMediaCasterStreams();
MediaCasterStreamItem mediaCasterItem = mediaCasterMap.acquire(streamName);