Skip to content
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

[SQS] Requeued message is not marked as a redelivered #728

Closed
uro opened this issue Jan 15, 2019 · 2 comments
Closed

[SQS] Requeued message is not marked as a redelivered #728

uro opened this issue Jan 15, 2019 · 2 comments
Labels

Comments

@uro
Copy link
Contributor

uro commented Jan 15, 2019

When we requeue a message it's not marked as redelivered by default. We can manually modify message object and mark it as redelivered in our processor before requeueing it.

Unfortunately this solution is not clear for people coming from other libraries. Personally I thought that it should mark messages as redelivered automatically, especially as we have DelayRedeliveredMessageExtension which can delay those messages.

Maybe requeued messages should be marked as redelivered automatically?
Without it we can't use properly requeue option, because how we can know that something was requeued?

We requeue message to process it later, but then we don't know if it has been requeued

    /**
     * Use this constant when the message is not valid or could not be processed right now but we can try again later
     * The original message is removed from the queue but a copy is published to the queue again.
     */
    const REQUEUE = 'enqueue.requeue';

In message we have a specification of redelivered message, it's not passing it requirements at all. Maybe we should have another parameter then?

    /**
     * Gets an indication of whether this message is being redelivered.
     * The message is considered as redelivered,
     * when it was sent by a broker to consumer but consumer does not ACK or REJECT it.
     * The broker brings the message back to the queue and mark it as redelivered.
     */
    public function isRedelivered(): bool;

but the DelayRedeliveryExtension basing on redelivery parameter so I assume it's proper one.

@makasim
Copy link
Member

makasim commented Jan 16, 2019

@uro have you tried this fix #722. It should fix your issue.
No tag yet

it should trigger this line and therefore mark a message as redelivered

@makasim makasim added the bug label Jan 16, 2019
@makasim
Copy link
Member

makasim commented Jan 16, 2019

feel free to reopen if the issue still exists.

@makasim makasim closed this as completed Jan 16, 2019
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

2 participants