syntax: push_stream_publisher [normal | admin]
default: normal
context: location
Defines a location as a message publisher. Requests to a publisher location are treated as messages to be sent to subscribers.
This location supports the following http methods:
GET, make possible to get statistics about the channel
POST/PUT, publish a message to the channel
DELETE, remove any existent stored messages, disconnect any subscriber, and delete the channel. Available only if admin value is used in this directive.
# normal publisher location location /pub { push_stream_publisher; push_stream_channels_path $arg_id; } # GET /pub?id=channel_id -> get statistics about a channel # POST /pub?id=channel_id -> publish a message to the channel # admin publisher location location /pub_admin { push_stream_publisher admin; push_stream_channels_path $arg_id; } # GET /pub_admin?id=channel_id -> get statistics about a channel # POST /pub_admin?id=channel_id -> publish a message to the channel # DELETE /pub_admin?id=channel_id -> delete the channel
values: channel id
location: push_stream_publisher, push_stream_channels_statistics
A string to uniquely identify a communication channel. Must be present on location of the push_stream_publisher and push_stream_channels_statistics.
push_stream_channels_path $arg_id; #channel id is now the url query string parameter "id" #(/pub?id=channel_id_string or /channels-stats?id=channel_id_string)
syntax: push_stream_store_messages on | off
default: off
context: location (push_stream_publisher)
Whether or not message queuing is enabled.
syntax: push_stream_channel_info_on_publish on | off
default: on
context: location (push_stream_publisher)
release version: 0.3.5
Enable send back channel information after publish a message.