Created
December 15, 2009 00:55
-
-
Save jacobb/256615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# internal publish endpoint (keep it private / protected) | |
location /publish { | |
set $push_channel_id $arg_id; #/?id=239aff3 or somesuch | |
push_publisher; | |
push_store_messages on; # enable message queueing | |
push_message_timeout 2h; # expire buffered messages after 2 hours | |
push_max_message_buffer_length 10; # store 10 messages | |
push_min_message_recipients 0; # minimum recipients before purge | |
} | |
# public long-polling endpoint | |
location /activity { | |
push_subscriber; | |
# how multiple listener requests to the same channel id are handled | |
# - last: only the most recent listener request is kept, 409 for others. | |
# - first: only the oldest listener request is kept, 409 for others. | |
# - broadcast: any number of listener requests may be long-polling. | |
push_subscriber_concurrency broadcast; | |
set $push_channel_id $arg_id; | |
default_type text/plain; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment