Skip to content

[Bug] POP retry response recoding uses the wrong record after a multi-message batch #10945

Description

@Aias00

Reproduction\n\nWhen POP returns more than one normal message before a retry-topic result, PopConsumerContext stores one GetMessageResult per fetch result but flattens PopConsumerRecord entries per message.\n\nPopConsumerService later iterates getMessageResultList by result index and looks up popConsumerRecordList with the same index. After a multi-message result, that index points into the preceding batch instead of to the first record for the current result.\n\nWith popResponseReturnActualRetryTopic enabled, a retry result can therefore be treated as a normal result and skip retry-message recoding.\n\n## Expected behavior\n\nEach fetched GetMessageResult must use the first PopConsumerRecord that belongs to that result when deciding whether to recode retry messages.\n\n## Regression test\n\nPopConsumerServiceTest.popAsyncRecodeRetryMessagesAfterMultiMessageNormalResultTest fails on current develop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions