Skip to content

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

Closed
@uro

Description

@uro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions