slact / nchan

Fast, horizontally scalable, multiprocess pub/sub queuing server and proxy for HTTP, long-polling, Websockets and EventSource (SSE), powered by Nginx.
https://nchan.io/
Other
2.99k stars 292 forks source link

nchan_store_messages off is not working properly #668

Open panperla opened 1 year ago

panperla commented 1 year ago

When I connect to my /chat endpoint (config below) i see old messages event if is set: nchan_message_buffer_length 0; nchan_store_messages off;

NCHAN_VERSION 1.3.5 and 1.3.6

upstream my_redis_server {
    nchan_redis_server redis.nchan.svc.cluster.local;
    nchan_redis_connect_timeout 2s;
    nchan_redis_storage_mode nostore;
    nchan_redis_nostore_fastpublish on;
    nchan_redis_ping_interval 1m;
  }
  location ~ /chat/(\w+)/((a|u|m)\-\w+)$ {
    nchan_store_messages off;
    nchan_message_buffer_length 0;

    set $ichatid $1;
    set $userhash $2;
    nchan_subscriber;
    nchan_subscribe_request /upstream/sub;
    nchan_unsubscribe_request /upstream/unsub;
    nchan_channel_id chat_$1;
    nchan_redis_pass my_redis_server;
    }
location ~ /chatpub/(\w+)$ {
      nchan_publisher;
      nchan_message_buffer_length 0;
      nchan_store_messages off;
      nchan_channel_id chat_$1;
      nchan_redis_pass my_redis_server;
    }

Am I missing somthing ?