On Friday, November 22, 2019 at 7:08:46 AM UTC-5, Levent Engin wrote: > > Hi, > > I am using Django Channels2. After a system failure or power crash channel > name of the receiver persists without a proper disconnect(). >
*Where* does the channel name persist? (Surely not on the machine that turned off....) Be very clear on which problem you want to solve: - It's *impossible* to "fix" senders so they never send to a channel that doesn't exist. (Channels can disappear at any time, so a race is inevitable.) - It's possible to "expire" invalid messages so they don't impede delivery of valid messages. Tune the expiry <https://github.com/django/channels_redis#expiry> option. - It's possible to "expire" a channel out of a *group* ... but you'll want that duration to be very long. Tune the group_expiry <https://github.com/django/channels_redis#group_expiry> option. Personally, I use RabbitMQ; I built a channel layer, https://github.com/CJWorkbench/channels_rabbitmq, that promises a better solution. With RabbitMQ, messages destined for a disconnected host disappear immediately; and channels disappear from groups immediately (so you should set group_expiry to an enormous number). Enjoy life, Adam -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/61cc91ef-9569-4418-9e59-64788b196402%40googlegroups.com.

