notify_method

The `notify_method` directive configures the callback method for notifications in the NGINX RTMP module.

Syntaxnotify_method method;
Defaultnone
Context
Arguments1

Description

The notify_method directive specifies the method that the NGINX RTMP module will use to send notifications regarding events such as stream publishing or playback actions. This allows for integration with external systems that can react to stream events, which can be useful for applications like monitoring, analytics, or interactivity between services. The directive takes a single argument that typically represents the HTTP method (e.g., POST or GET) used in the callback.

When you set the notify_method, you are enabling the RTMP server to communicate with a specified endpoint whenever a keystream event occurs. This is often used in scenarios where external services need to react to live streaming events, allowing developers to implement custom functionality like updating a user interface or logging stream metrics. The events can include notifications for actions like stream start, stream stop, and status updates.

It’s important to ensure the configured endpoint handling the notifications is able to both accept the request and respond in a timely manner to avoid stream interruptions. Users should also verify server permissions and network accessibility for the application endpoints specified in notifications. Additionally, careful error handling should be implemented on the endpoint to correctly manage any failed notifications and address potential issues without impacting the streaming experience.

Config Example

notify_method POST;

Ensure that the endpoint is reachable from the NGINX server to avoid dropped notifications.

Check the response time of the endpoint to ensure it does not block streaming actions.

Using the wrong HTTP method can lead to failure in notifications being sent.

← Back to all directives