Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:37:24+00:00 2026-06-10T13:37:24+00:00

Perhaps I’m being silly asking the question but I need to wrap my head

  • 0

Perhaps I’m being silly asking the question but I need to wrap my head around the basic concepts before I do further work.

I am processing a few thousand RSS feeds, using multiple Celery worker nodes and a RabbitMQ node as the broker. The URL of each feed is being written as a message in the queue. A worker just reads the URL from the queue and starts processing it. I have to ensure that a single RSS feed does not get processed by two workers at the same time.

The article Ensuring a task is only executed one at a time suggests a Memcahced-based solution for locking the feed when it’s being processed.

But what I’m trying to understand is that why do I need to use Memcached (or something else) to ensure that a message on a RabbitMQ queue not be consumed by multiple workers at the same time. Is there some configuration change in RabbitMQ (or Celery) that I can do to achieve this goal?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:37:26+00:00Added an answer on June 10, 2026 at 1:37 pm

    As noted by others you are mixing apples and oranges.

    Being a celery task and a MQ message.

    You can ensure that a message will be processed by only one worker at the same time.

    eg.

    @task(...)
    def my_task(
    
    my_task.apply(1)
    

    the .apply publishes a message to the message broker you are using (rabbit, redis…).
    Then the message will get routed to a queue and consumed by one worker at time. you dont need locking for this, you have it for free 🙂

    The example on the celery cookbook shows how to prevent two messages like that (my_task.apply(1)) from running at the same time, this is something you need to ensure within the task itself.

    You need something which you can access from all workers of course (memcached, redis …) as they might be running on different machines.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Perhaps it is a silly question but I want to be sure about it.
Perhaps i am being stupid by asking this just now, but... I notice that
Perhaps it is a dumb question but I am confused with the following: Are
Perhaps a stupid question, but what exactly is the purpose of this Delphi folder?:
Perhaps I'm being too ambitious here, but I'm trying to pass a shared_ptr back
Perhaps this is a duplicate question, but I havn't found something by myself. Basically
Perhaps a dump question (But I'm not a super experienced user of .NET), but
Perhaps this is a non-question, but how do you make use of the Django
Perhaps a noob question, but take this T-SQL query in mind: UPDATE Table SET
Perhaps the Question isnt that simple to answer... but what is your opinion? Should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.