Closed IvesFeng closed 10 months ago
How do I send the message to the correct process?
There are several options here:
CONNECTIONS
.hset queues <client_id> <queue_id>
. When sending a message, first you find out which queue it goes to with hget queues <client_id>
, then you send the message to that queue.
I followed the tutorial(Integrate with Django) to write a websocket service, and then deployed it using Supervisor. I also configured the "numbrocs" to 4. Now I have a problem that all processes subscribe to redis messages, and the variable CONNECTIONS is different in each process. How do I send the message to the correct process? Or should I not use supervisor + pub/sub?