channels_redis icon indicating copy to clipboard operation
channels_redis copied to clipboard

channel_layer.group_send in another language

Open amirmehdi opened this issue 3 years ago • 2 comments

Hi, thanks for this great project I want to implement my web socket in Django but other microservices (in other languages like java and golang) can send some messages to a group. How can I do this? I tried to understand the group_send function but it is very complicated. I know how to communicate with Redis in another language. Can you explain the function of sending a group to me?

amirmehdi avatar May 18 '21 13:05 amirmehdi

In the channel_rabbit_mq project, the group_send function is implemented simply and very briefly, and it does only one thing, and that is to send to the queue. https://github.com/CJWorkbench/channels_rabbitmq/blob/master/channels_rabbitmq/core.py#L436 But I do not know what Function group_send does in this project.

amirmehdi avatar May 18 '21 16:05 amirmehdi

If you use the new pubsub.py implementation, then group_send is much easier to understand. Worth consideration -- it just uses Redis pub/sub so it should be easy to publish messages from whatever language you want, and the groups name (channel names) are easy to derive.

acu192 avatar Jul 25 '21 17:07 acu192