wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

individual push_stream_message_ttl and push_stream_max_messages_stored_per_channel per channel #158

Open funkydonkey123 opened 10 years ago

funkydonkey123 commented 10 years ago

Hi,

first of all let me thank you for this great module. As far as I found out it is currently not possible to set push_stream_message_ttl and push_stream_max_messages_stored_per_channel for each channel individually. Or is there a way to do this?

wandenberg commented 10 years ago

Hi @funkydonkey123 No, these configuration are applied to all channels and stored on server main configuration. I don't know if it makes sense to be a location configuration, or even by channel configuration. Do you have a use case to this?

funkydonkey123 commented 10 years ago

Hi, thanks for getting back. I have a use case where I would want to use different channels for slightly different functions (like some for live chat and some for instant notifications to visitors of a website). So at least for my use case it would be nice to be able to setup channels individually (for example: all channels where the name starts with notification the messages have a shorter ttl because the notifications are only interesting if received instantly)

mkonecny commented 9 years ago

Here's one use case that would definitely justify this feature.

Currently we are using both the websocket and long-polling features.

With long-polling the client has to re-connect every 60 seconds, meaning I need to store a message in the channel in the not so rare case when the client is reconnecting.

With Websockets, since the client's connection is more permanent, it would be nice to disable message queueing.