Skip to content

[Bug] Proxy gRPC converter should tolerate malformed timer properties #10685

Description

@Aias00

Bug description

GrpcConverter.buildSystemProperties parses timer message properties with Long.parseLong when building the gRPC SystemProperties.delivery_timestamp field:

  • MessageConst.PROPERTY_TIMER_DELAY_SEC
  • MessageConst.PROPERTY_TIMER_DELIVER_MS

If either property is present but malformed, buildMessage can throw NumberFormatException while converting a Broker MessageExt into the gRPC v2 Message response. This can make a single malformed timer property fail the whole gRPC message response/query conversion path.

Expected behavior

The converter should tolerate malformed optional timer properties. Valid timer properties should still set delivery_timestamp; malformed values should be ignored with a diagnostic warning instead of failing the message conversion.

Affected area

proxy module, gRPC v2 message conversion.

Suggested fix

  • Parse timer properties through a safe helper.
  • Keep existing behavior for valid PROPERTY_TIMER_DELAY_SEC and PROPERTY_TIMER_DELIVER_MS values.
  • Ignore malformed values and log a warning with diagnostic context.
  • Add unit tests for valid and malformed timer properties.

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