Dynamic and multiple subscription / publishing channels with django-websocket-redis?

I want users to be able to communicate on several channels simultaneously on one page - basically, there are several chat windows on one page based on the user's preferences, and all messages are saved when the user opens a specific chat window. I want him to see all the messages that were sent to this chat. There is little documentation in the database, I can’t find a better way to implement it:

  • The channel list is hardcoded in the RedisSubscriber class - how to include dynamic channels in the list?
  • What is the best way to work with multiple channels? Use single-channel and "filtering" messages to display for an object based on some unique identifier (could not find this function in ws4redis.js) or just make several subscriptions?
  • is django-websocket-redis a good match for this overall?
+4
source share

Source: https://habr.com/ru/post/1615975/


All Articles