Answer the question
In order to leave comments, you need to log in
How to make ActionCable use its own namespace in Redis?
Morning in the house, dear!
ENV: ruby 2.4.1, rails 5.1, nginx 1.10.3
There is a server running 3 identical services. Each of the services uses WebSockets.
All channel settings are the same. The difference is only in the cable.yml config
For the first service:
production: &production
adapter: redis
url: redis://localhost:6379/1
class MessagesChannel < ApplicationCable::Channel
def subscribed
stream_from 'messages'
end
end
ActionCable.server.broadcast('messages', message.to_json)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question