how to customize ASGI ChannelLayer ?

21 views
Skip to first unread message

wang sheng

unread,
Dec 15, 2016, 5:53:37 PM12/15/16
to django...@googlegroups.com
I an developing a chat app, while some user is offline, I need to persist  the message from his  online friends .  so , I think it is good choice to develop a customized ChannelLayer  which will transfer all offline messages to a consumer worker who save message to cache .  is it right that using ChannelLayer to do such work ? 
     
   But,  I doesn't find any useful information about How to customize the ChannelLayer. 

Andrew Godwin

unread,
Dec 16, 2016, 12:12:54 AM12/16/16
to django...@googlegroups.com
No, that's not what a channel layer is meant to do - it's for short term buffering (messages expire after a minute by default).

I suggest you use a database.

Andrew

On 15 Dec 2016 17:53, "wang sheng" <wan...@gmail.com> wrote:
I an developing a chat app, while some user is offline, I need to persist  the message from his  online friends .  so , I think it is good choice to develop a customized ChannelLayer  which will transfer all offline messages to a consumer worker who save message to cache .  is it right that using ChannelLayer to do such work ? 
     
   But,  I doesn't find any useful information about How to customize the ChannelLayer. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BmnDnr_WapOdOCUJQH%2B-sECPgtGHSCb9cK-ODquq5yEiUjntg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages