|push_stream_max_number_of_broadcast_channels|unset|number|http, location|(push_stream_subscriber and push_stream_publisher) or main nginx configuration|
|push_stream_memory_cleanup_timeout|30 seconds|time constant|http, location|(push_stream_subscriber and push_stream_publisher) or main nginx configuration|
If store messages is "On" is needed to set at least one of these two directives push_stream_min_message_buffer_timeout or push_stream_max_message_buffer_length.
h4(#push_stream_min_message_buffer_timeout). push_stream_min_message_buffer_timeout [ time ]
The maximum number of messages to store per channel. A channel's message buffer will retain at most this many most recent messages. If you do not want messages to be discarded by length, just not set this directive.
h3. Security
h3(#security). Security
h4(#push_stream_authorized_channels_only). push_stream_authorized_channels_only [ on | off ]
Whether or not a subscriber may create a channel by making a request to a push_stream_subscriber location. If set to on, a publisher must send a POST request before a subscriber can request messages on the channel. Otherwise, all subscriber requests to nonexistent channels will get a 403 Forbidden response.
This restriction is not applied to broadcast channels, but to subscribe to a broadcast channel is necessary to subscribe at least to one normal channel, and if this directive is set to on this channel has to be created before.
h4(#push_stream_subscriber_connection_timeout). push_stream_subscriber_connection_timeout [ time ]
The length of time a subscriber will stay connected before it is considered expired and disconnected. If you do not want subscribers to be automatically disconnected, just not set this directive.
But, this operation is very important to help Nginx recycle memory consumed to send messages to susbscriber, allocated at pool request.
h4(#push_stream_max_channel_id_length). push_stream_max_channel_id_length [ number ]
default: -
...
...
@@ -349,7 +333,6 @@ location: (push_stream_subscriber and push_stream_publisher) or main nginx confi
Maximum permissible channel id length (number of characters). Longer ids will receive an 400 Bad Request response.
@@ -358,7 +341,6 @@ location: (push_stream_subscriber and push_stream_publisher) or main nginx confi
The string prefix used to identify when a channel is as normal or broadcast channel, example: when you set this directive as "bd_", "bd_ch1" will be a broadcast channel
h4(#push_stream_broadcast_channel_max_qtd). push_stream_broadcast_channel_max_qtd [ number ]
default: -
...
...
@@ -368,7 +350,6 @@ location: (push_stream_subscriber and push_stream_publisher) or main nginx confi
The maximum number of broadcast channels that a subscriber may sign on the request.
This directive works in conjunction with push_stream_authorized_channels_only to preserve the server from a kind of attack where a subscriber sign one normal channel and many nonexistent broadcast channels.
h4(#push_stream_max_number_of_channels). push_stream_max_number_of_channels [ number ]
default: -
...
...
@@ -377,7 +358,6 @@ location: (push_stream_subscriber and push_stream_publisher) or main nginx confi
The maximum number of concurrent channels on the server. If you do not want to limit the number of channels, just not set this directive.
h4(#push_stream_max_number_of_broadcast_channels). push_stream_max_number_of_broadcast_channels [ number ]
default: -
...
...
@@ -386,7 +366,6 @@ location: (push_stream_subscriber and push_stream_publisher) or main nginx confi
The maximum number of concurrent broadcats channels on the server. If you do not want to limit the number of broadcast channels, just not set this directive.
h4(#push_stream_memory_cleanup_timeout). push_stream_memory_cleanup_timeout [ time ]
default: 30 seconds
...
...
@@ -396,7 +375,6 @@ location: (push_stream_subscriber and push_stream_publisher) or main nginx confi
The length of time a message or a channel will stay on garbage collection area before it is completly discarded, freeing the shared memory. The minimum length is 30 seconds to ensure that no one is using these elements.
This operation is very important to help Nginx recycle memory consumed to create messages and channels, so do not use a large time.
h2(#attention). Attention
This module controls everything needed to send the messages to subscribers.
...
...
@@ -410,3 +388,5 @@ You can do this using the _chunked_transfer_encoding_ directive on subscriber lo