Amazon-SQS + Django-Celery creates thousands of queues (a queue for each message)

I am looking for a place to start fixing this problem.

here are the changes made to settings.py

#Rabbit MQ settings
#===============================================================================
# BROKER_HOST = "localhost"
# BROKER_PORT = 5672
# BROKER_USER = "vei_0"
# BROKER_PASSWORD = "1234"
# BROKER_VHOST = "videoencoder"
#===============================================================================




DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = "xxxx"
AWS_SECRET_ACCESS_KEY = "xxxx"
AWS_STORAGE_BUCKET_NAME = "images"
#Amazon SQS settings.
BROKER_TRANSPORT = 'sqs'
BROKER_TRANSPORT_OPTIONS = {
    'region': 'us-east-1',
}
BROKER_USER = AWS_ACCESS_KEY_ID
BROKER_PASSWORD = AWS_SECRET_ACCESS_KEY
CELERY_DEFAULT_QUEUE = 'hardwaretaskqueue'
CELERY_QUEUES = {
    CELERY_DEFAULT_QUEUE: {
        'exchange': CELERY_DEFAULT_QUEUE,
        'binding_key': CELERY_DEFAULT_QUEUE,
    }
}


CELERYD_CONCURRENCY = 2
CELERY_TASK_RESULT_EXPIRES = 120
CELERY_RESULT_BACKEND = "amqp"

I woke up this morning to a message from an Amazon saying, "Did you mean to line up in the billion?"

+5
source share
1 answer

When using a CELERY_RESULT_BACKEND = 'amqp'result for each message, a new queue is created. To avoid this, you can simply use another CELERY_RESULT_BACKEND, such as a database or Redis. Or, if you are not interested in the results, you can install CELERY_IGNORE_RESULT = True.

+9
source

All Articles