push_stream_channel_deleted_message_text

The push_stream_channel_deleted_message_text directive defines the message sent when a channel is deleted.

Syntaxpush_stream_channel_deleted_message_text text;
Defaultnone
Contexthttp
Arguments1

Description

The push_stream_channel_deleted_message_text directive is used within the NGINX Push Stream Module to specify a custom message that will be sent to all subscribers when a specified channel is deleted. This message can be used to inform users about the deletion of that channel, allowing for greater transparency and communication in applications utilizing real-time streaming. The directive requires a single argument, which is the text of the message to be sent.

When configuring this directive, the message string should be enclosed in quotes. This will ensure that the message is correctly parsed and registered within the NGINX configuration context. In addition, the precise wording of the deletion message can be tailored based on application requirements, giving developers the flexibility to provide context-sensitive information to subscribers when a channel is no longer available. If this directive is not specified, no deletion message will be broadcasted to the subscribers, which may lead to a better user experience in applications where such notifications are unnecessary.

The directive should be defined in the http context of the NGINX configuration file and is generally used alongside other related directives such as push_stream_shared_memory_size and push_stream_max_messages_stored_per_channel to fully define the behavior of push stream channels within an application. Proper use of this directive helps maintain a seamless user experience when channels are managed dynamically.

Config Example

http {
    push_stream_shared_memory_size 32M;
    push_stream_channel_deleted_message_text "Channel has been deleted";
}

Ensure that the message is enclosed in quotes to avoid configuration errors.

If the directive is omitted, no deletion messages will be sent, which can confuse subscribers.

← Back to all directives