This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Semi, aptrishu, davin, rhettinger
Date 2017-03-04.07:49:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488613740.78.0.878695107316.issue29454@psf.upfronthosting.co.za>
In-reply-to
Content
> Expected: items stay in the queue until a consumer consumes it

That would be my expectation as well.

Davin, do you know why the example in the docs uses queue.Queue() instead of multiprocessing.Queue()?  Would there be a difference?

Also, I'm curious about the best practice for message queues when a consumer is killed.  Even if the message getting is atomic and never loses a message, what do people normally do to resurrect a task that was already underway when the consumer is killed?  I presume there is no easy way to find-out whether the task had just started, was in-process and changed the state of the system, or mostly finished.  Is there some sort of coding pattern for begin_transaction, commit, and rollback?  ISTM, that killing consumers is a perilous business.

The only reliable pattern I can think of is for the consumer to send back messages through another queue to indicate that a task was received and underway, and to indicate that a task was completed.
History
Date User Action Args
2017-03-04 07:49:00rhettingersetrecipients: + rhettinger, davin, Semi, aptrishu
2017-03-04 07:49:00rhettingersetmessageid: <1488613740.78.0.878695107316.issue29454@psf.upfronthosting.co.za>
2017-03-04 07:49:00rhettingerlinkissue29454 messages
2017-03-04 07:49:00rhettingercreate