 
#user  nobody;
#worker_processes 20;

worker_rlimit_core  1024M;
worker_rlimit_nofile 100000;
#debug_points stop;

#error_log  /dev/stderr debug;
error_log  /dev/stderr  notice;
#error_log   err.log  notice;

pid        /tmp/pushmodule-test-nginx.pid;
#daemon	    off;

events {
  worker_connections  90000;
  accept_mutex on;
}

http {
  access_log /dev/stdout;
#  access_log /dev/stdout;
  default_type  application/octet-stream;
  client_body_temp_path /tmp/ 1 2;
  sendfile        on;
  keepalive_timeout  65;
  push_authorized_channels_only off;
  server {
    listen       8082;
#    root ./;
    location ~ /pub/(\w+)$ {
      set $push_channel_id $1;
      push_publisher;
      push_min_message_buffer_length 5;
      push_max_message_buffer_length 20;
      push_message_timeout 5s;
      push_channel_group test;
    }

    location ~ /sub/broadcast/(\w+)$ {
      push_subscriber;
      push_channel_group test;
      set $push_channel_id $1;
      push_subscriber_concurrency broadcast;
    }
    location ~ /sub/first/(\w+)$ {
      push_subscriber;
      push_channel_group test;
      set $push_channel_id $1;
      push_subscriber_concurrency first;
    }
    location ~ /sub/last/(\w+)$ {
      push_subscriber;
      push_channel_group test;
      set $push_channel_id $1;
      push_subscriber_concurrency last;
    }

    #authorized channels only -- publishers must create the channel before subscribing
    location ~ /sub/authorized/(\w+)$ {
      push_authorized_channels_only on;
      push_subscriber;
      push_channel_group test;
      set $push_channel_id $1;
    }

    
    

  }
}
