This article will describe a good way to shut down a RTMP publisher from a Wowza module. Essentially we’ll leverage the IMediaStreamActionNotify2 interface and override the publish method. Thereafter we’ll invoke the sendStreamOnStatusError function along with the setShutdownClient to complete this operation. Please see the following:
class StreamManager implements IMediaStreamActionNotify2 { @Override public void onPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend) { IClient client = stream.getClient(); sendStreamOnStatusError(stream, "NetStream.Publish.BadName", "Denied"); client.setShutdownClient(true); logger.info(">> onPublish[" + streamName + "] Rejected "); } .... [the rest of the interface functions defined] ... }