Open MrDefacto opened 8 years ago
Can you give me a use case for this? There is already nchan_publisher_upstream_request
which can be used to pass a published message to an upstream app via HTTP. I think adding an option to publish on a custom PUBSUB channel would just get confusing...
for example publisher will subscribe to redis: SUBSCRIBE 'keyevent@0:lpush' 'variable'
and then any lpush to variable in redis will publish it to subscribers.
sending command to redis via it's protocol not via http.
Oh, I understand. That could be a useful feature, but I'm not sure it's possible in the context of nginx configuration. If you have any ideas on how this feature could be configured, I'd like to hear them.
in publisher location definition something like:
location ~ /publish/$ {
nchan_publisher;
nchan_redis_pass redis_cluster;
nchan_redis_publisher_subscribe 'redis_channel' 'redis_channel2'
nchan_channel_id "test";
}
Sample: nchan_redis_publisher_subscribe 'keyevent@0:lpush'
Just like Redis SUBSCRIBE command works.
Redis is then returning for subscribers (in this case nchan) something like this:
1) "message"
2) "__keyevent@0__:lpush"
3) "{channel:/test}:messages"
Parsing this can be even made in JS but it can by also preparsed by nchan.
I would like this because Laravel 5.3 broadcaster has a Redis driver but not an nchan driver.
Hi,
Are there any plan do add functionality that will map/bridge nchan publisher do redis subscribe. For example command: nchan_publisher_redis_subscribe 'redis_channel' will subscribe to redis (SUBSCRIBE feature) and publish to nchan subscribers all brodcasts from redis?
Best regards,