Wowza Community

Stream targets java function

Is there a java function for adding, removing a Stream Target?

For a little while the PushPublishMap.txt has said not to edit and to use the restAPI but we have several custom java modules that do things onPublish etc, I’ve looked several times but nothing.

Currently we add lines to the PushPublishMap.txt file but that often has issues, stuck on waiting, going into manager selecting edit and then save fixes this (nothing in the txt file changes so it was correct), we have for a couple years used a backup rest api to dynamically catch this but with this being often slow to respond it then causes additional issues with our webservers so we have removed this.

There must be an option to do this from Java without the need to go externally via the rest api.

You can do it via the Java API but it won’t show up in the PushPublishMap.txt and it won’t show up in the Engine Manager Panel. If you want it to show up there then what you can do is call the REST API from within your Java module. Seems like a workaround but works just fine and all Wowza’s own tools will function as expected.

If you don’t mind the PushPublishMap.txt and the Engine Manager Panel; then you can use the classes and methods under the com.wowza.wms.pushpublish namespace

1 Like

Thank you for this information.

I’m unsure of using the REST API from within Java, if it contacts itself it tends to lock up and become unresponsive.

The pushpublish class doesn’t seem to carry any instruction on how to set where the stream is pushed too.