# Stop a live RTMP push stream using API

**URL:** <https://community.wowza.com/t/stop-a-live-rtmp-push-stream-using-api/50468>\
**Category:** Wowza Developer Dojo\
**Created:** [January 2, 2018, 4:33pm UTC](https://community.wowza.com/t/stop-a-live-rtmp-push-stream-using-api/50468 "2018-01-02T16:33:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [January 2, 2018, 4:33pm UTC](https://community.wowza.com/t/stop-a-live-rtmp-push-stream-using-api/50468/1 "2018-01-02T16:33:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [January 6, 2018, 4:40pm UTC](https://community.wowza.com/t/stop-a-live-rtmp-push-stream-using-api/50468/2 "2018-01-06T16:40:23Z")

</div>

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](https://www.wowza.com/docs/how-to-limit-publishing-of-live-streams-by-ip-list)
