Skip to content

Commit

Permalink
Merge 0753271 into 01f43cd
Browse files Browse the repository at this point in the history
  • Loading branch information
psarma89 committed May 17, 2021
2 parents 01f43cd + 0753271 commit 92b66c2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@ messages.
$ pyqs send_email --concurrency 10
Simple Process Worker
~~~~~~~~~~~~~~~~~~~~~

To use a simpler version of PyQS that deals with some of the original implementation short comings, pass the ``simple-worker`` flag.

.. code:: bash
$ pyqs send_email --simple-worker
The Simple Process Worker differs in the following way from the original implementation.

* Does not use an internal queue and removes support for the ``prefetch-multiplier`` flag. This helps simply the mental model required, as messages are not on both the SQS queue and an internal queue.
* When the ``simple-worker`` is passed, the default `batchsize` is 1 instead of 10. This is configurable.
* Does not check the visibility timeout when reading or processing messages from SQS queue.
* Allowing the worker to process the message even past its visibility timeout means we solve the problem of never processing a message if ``max_receives=1`` and we incorrectly set a shorter visibility timeout and exceed the visibility timeout. Previously, this message would have ended up in the DLQ, if one was configured, and never actually processed.
* It increases the probability that we process a message more than once, especially if batchsize > 1, but this can be solved by the developer checking if the message has already been processed.

Hooks
~~~~~

Expand Down

0 comments on commit 92b66c2

Please sign in to comment.