Skip to content

Remove message after n retry attempts #940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YuriyChmil opened this issue Aug 22, 2019 · 5 comments
Closed

Remove message after n retry attempts #940

YuriyChmil opened this issue Aug 22, 2019 · 5 comments
Labels

Comments

@YuriyChmil
Copy link

YuriyChmil commented Aug 22, 2019

Hey!
Is there any possibility to remove the message from the queue after n attempts failed to try to handle it?
For example, if 5 times the processor couldn't handle it must remove from queue.

Also, It is possible doesn't stop the consumer when an exception occurred? In this case, I want to try redeliver this message end try to handle it one more time? I know about REQUEUE options, put it push message to the new queue, but I want to push to the same queue. Is it possible?

@stale
Copy link

stale bot commented Sep 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 21, 2019
@daemonfire300
Copy link

daemonfire300 commented Sep 23, 2019

Hi there,

pushing this issue again, because:

I am using enqueue-redis and have a very simple Processor. How do I get enqueue to redeliver a Message for a later date, i.e., Message comes to processor, something temporarily did not work, let's process this message later.
What I tried:

  • Processeor::REQUEUE, but this puts a copy of the message into the queue and instantly tries to re-process it again.
  • Processor:REJECT, simply discards the message, never retries it
  • Throwing an exception in the processor, this also does not achieve the intended effect.

thaks in advance

@stale stale bot removed the wontfix label Sep 23, 2019
@stale
Copy link

stale bot commented Oct 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 23, 2019
@stale stale bot closed this as completed Oct 30, 2019
@emrahoruc
Copy link

Something like a attempt counter is needed. Any solution?

@emrahoruc
Copy link

I found a solution in the php-enqueue/laravel-queue package. Uses the property field for attempts.
See:
https://github.com/php-enqueue/laravel-queue/blob/2c4ac43e0e4c65cc06406a45cab6d73991032622/src/Job.php#L62

Thank to all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants