I am working in a Python Django project.
One of its functionality is when someone send some data from a web application, foreward them to a mobile device.
For this functionality, application uses third party services as GCM & Amazon SNS. Following is the data flow of the application.
Web Application ------> Amazon SNS -------> GCM -------> Android Device
Due to the possible network delays, operational delays and failures in Amazon SNS side, web application uses celery as the scheduler application to achieve behaviors like asynchronous, retrying etc. Celery stores SNS sending task in a queue and process them asynchronously.
Celery as the scheduler uses RabbitMQ as its broker application. All together following is the data flow.
Web App --> Celery --> RabbitMQ --> Amazon SNS --> GCM --> Android Device
An issue is identified related to the Celery and RabbitMQ components.
We can see when celery sends a task to RabbitMQ, particular RabbitMQ queue count grows which means celery successfully created a task object and sent to the queue.
But particular task is exist in the queue forever(queue count doesn't reduced) and doesn't proceed to send the message to the Amazon SNS, which means Celery doesn't pick the stored task again from the queue.
(I could successfully push a message to the SNS bypassing the Celery which means there is no connection issue to the SNS.)
Which may cause celery not to pick the stored task from the RabbitMQ ?