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