Stop a live RTMP push stream using API

Hello,

Is there a way, using the Java API, to stop a live RTMP push stream? I though of doing it from the onPublish method, using stream.stopPublishing() or stream.close(), but that did not work.

Thanks,

Eyal Hasson.

I was able to do that using the example here: https://www.wowza.com/docs/how-to-limit-publishing-of-live-streams-by-ip-list