Hi all,
We currently send an AMQP message to a RabbitMQ Broker if a certain condition is met during the request and response cycle. In order to send the message, we open a connection to the broker, send the message, then close the connection.
This is clearly not as efficient as it could be, and I am looking for any examples of code that create a connection and keep it alive within a django application, and then use that connection to send a message during the request and response cycle.
I believe Celery operates in this sort of way, with a connection established and kept alive so I believe that it is possible. Also, I believe db connections are also kept open between requests, but I was looking for any other simpler examples.
Any help would be much appreciated.
Cheers
Oli
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGGE9EPTrut3cchOJAkbDJsydW5tEH%3D2RPMZsrdHSmhy0Ypvjg%40mail.gmail.com.
No comments:
Post a Comment