0

I'm currently writing a chat messenger using GRPC/RabbitMQ for group chats. I have an API in Django/DRF that handles authentication/message logs/text and email alerts etc.

To do this I would like to create a celery task that subscribes to each group message exchange but I'm unclear if there is there a way to bind a celery task to the message exchanges.

Is it realistic/possible to create celery tasks that subscribe to the chat exchanges I create? If not how would you solve/handle these duties?

Dash Winterson
  • 1,197
  • 8
  • 19
  • What do you mean by subscribe? What you're asking is possible, but can you describe exactly what would be happening? – Sam Creamer Oct 25 '19 at 17:06
  • 1
    I actually ended up solving this, there's this amazing package called 'yosun' that lets you spawn tasks subscribed to queues – Dash Winterson Nov 04 '19 at 11:21

1 Answers1

1

Quick followup, I found an article that detailed using Kombu and Yosun to publish and/or subscribe via Django.

https://medium.com/@benjamin.pereto/microservices-with-django-events-with-publish-subscribe-9cad1c7aee39

Super helpful!

Dash Winterson
  • 1,197
  • 8
  • 19