h1(#main_configuration). Main Configuration

h2(#push_stream_shared_memory_size). push_stream_shared_memory_size <a name="push_stream_shared_memory_size" href="#">&nbsp;</a>

*syntax:* _push_stream_shared_memory_size size [name]_

*default:* _none_

*context:* _http_

The size of the memory chunk this module will use to store published messages, channels and other shared structures.
When this memory is full any new request for publish a message or subscribe a channel will receive an 500 Internal Server Error response.
If you have more than one http block on same Nginx instance and do not want they share the same memory, you can set different names to each one with the optional argument _name_.


h2(#push_stream_channel_deleted_message_text). push_stream_channel_deleted_message_text <a name="push_stream_channel_deleted_message_text" href="#">&nbsp;</a>

*syntax:* _push_stream_channel_deleted_message_text string_

*default:* _Channel deleted_

*context:* _http_

*release version:* _0.2.5_

The string used on channel deleted message sent to subscribers when the channel is deleted by a publisher.


h2(#push_stream_ping_message_text). push_stream_ping_message_text <a name="push_stream_ping_message_text" href="#">&nbsp;</a>

*syntax:* _push_stream_ping_message_text string_

*default:* _none_

*context:* _http_

*release version:* _0.2.5_

The string used on ping message sent to subscribers.


h2(#push_stream_channel_inactivity_time). push_stream_channel_inactivity_time <a name="push_stream_channel_inactivity_time" href="#">&nbsp;</a>

*syntax:* _push_stream_channel_inactivity_time time_

*default:* _30s_

*context:* _http_

*release version:* _0.3.5_

The length of time after what a channel will be considered inactive, counted after the last message was published on it or the last subscriber entered on it.
After this time the channel will no longer be available and will be moved to the trash queue.
When the "push_stream_authorized_channels_only":push_stream_authorized_channels_only is set to on, the inactivity time is only used to know when the channel should be moved to trash.


h2(#push_stream_message_ttl). push_stream_message_ttl <a name="push_stream_message_ttl" href="#">&nbsp;</a>

*syntax:* _push_stream_message_ttl time_

*default:* _30m_

*context:* _http_

The length of time a message may be queued before it is considered expired.


h2(#push_stream_max_subscribers_per_channel). push_stream_max_subscribers_per_channel <a name="push_stream_max_subscribers_per_channel" href="#">&nbsp;</a>

*syntax:* _push_stream_max_subscribers_per_channel number_

*default:* _none_

*context:* _http_

*release version:* _0.3.1_

The maximum number of subscribers accepted per channel. If you do not want to limit number of subscribers access to channels, just not set this directive.


h2(#push_stream_max_messages_stored_per_channel). push_stream_max_messages_stored_per_channel <a name="push_stream_max_messages_stored_per_channel" href="#">&nbsp;</a>

*syntax:* _push_stream_max_messages_stored_per_channel number_

*default:* _none_

*context:* _http_

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.


h2(#push_stream_max_channel_id_length). push_stream_max_channel_id_length <a name="push_stream_max_channel_id_length" href="#">&nbsp;</a>

*syntax:* _push_stream_max_channel_id_length number_

*default:* _none_

*context:* _http_

Maximum permissible channel id length (number of characters). Longer ids will receive an 400 Bad Request response. If you do not want to limit channel id length, just not set this directive.


h2(#push_stream_max_number_of_channels). push_stream_max_number_of_channels <a name="push_stream_max_number_of_channels" href="#">&nbsp;</a>

*syntax:* _push_stream_max_number_of_channels number_

*default:* _none_

*context:* _http_

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.


h2(#push_stream_max_number_of_wildcard_channels). push_stream_max_number_of_wildcard_channels <a name="push_stream_max_number_of_wildcard_channels" href="#">&nbsp;</a>

*syntax:* _push_stream_max_number_of_wildcard_channels number_

*default:* _none_

*context:* _http_

The maximum number of concurrent wildcard channels on the server. If you do not want to limit the number of wildcard channels, just not set this directive.


h2(#push_stream_wildcard_channel_prefix). push_stream_wildcard_channel_prefix <a name="push_stream_wildcard_channel_prefix" href="#">&nbsp;</a>

*syntax:* _push_stream_wildcard_channel_prefix string_

*default:* _none_

*context:* _http_

The string prefix used to identify a wildcard channel, example: when you set this directive as "bd_", "bd_ch1" will be a wildcard channel.
A wildcard channel is technically equals to a normal one. It is intended to be used when the "push_stream_authorized_channels_only":push_stream_authorized_channels_only is set to on.


h2(#push_stream_events_channel_id). push_stream_events_channel_id <a name="push_stream_events_channel_id" href="#">&nbsp;</a>

*syntax:* _push_stream_events_channel_id string_

*default:* _none_

*context:* _http_

*release version:* _0.6.0_

The string identify an events channel where some control messages will be published.
Examples:
{"type": "channel_created", "channel": "CHANNEL_ID"}
{"type": "channel_destroyed", "channel": "CHANNEL_ID"}
{"type": "client_subscribed", "channel": "CHANNEL_ID"}
{"type": "client_unsubscribed", "channel": "CHANNEL_ID"}

By default this channel is not available to subscription. To allow subscriptions to it is necessary set "push_stream_allow_connections_to_events_channel":push_stream_allow_connections_to_events_channel to on.


[push_stream_authorized_channels_only]subscribers.textile#push_stream_authorized_channels_only
[push_stream_allow_connections_to_events_channel]subscribers.textile#push_stream_allow_connections_to_events_channel
