Skip to content

[studio][Bug] Malformed retry counters can abort Proxy message forwarding #10904

Description

@messere1

Before Creating the Bug Report

  • I found a bug, not just a question.
  • I searched existing issues and pull requests for malformed reconsumeTimes, maxReconsumeTimes, and PROPERTY_RECONSUME_TIME handling.
  • I confirmed the affected code belongs to this repository.

Describe the Bug

ProducerProcessor#buildSendMessageRequestHeader parses retry-message properties with Integer.valueOf:

  • MessageConst.PROPERTY_RECONSUME_TIME
  • MessageConst.PROPERTY_MAX_RECONSUME_TIMES

If either stored property is malformed, building the broker request header throws NumberFormatException and the Proxy send/retry path fails. The same method already tolerates a malformed born timestamp by falling back to the current time, but retry counters do not have equivalent defensive handling.

Expected Behavior

  • Preserve the current behavior for valid retry counters.
  • Treat a malformed reconsume-times value as the existing default of 0.
  • Leave max-reconsume-times unset when its value is malformed.
  • Keep clearing the internal retry properties from the message after handling them.
  • Add focused tests proving malformed counters do not abort request-header construction.

Affected Area

RocketMQ Proxy producer/retry message processing used by RocketMQ Studio and gRPC/remoting operational flows.

Proposed Scope

Keep the change local to ProducerProcessor retry-counter parsing and its unit tests. Do not change public APIs or valid retry-message semantics.

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