Skip to main content

normalize_timer_request

Function normalize_timer_request 

Source
pub fn normalize_timer_request(
    properties: &HashMap<CheetahString, CheetahString>,
    now_ms: u64,
    policy: TimerPolicySnapshot,
) -> Result<NormalizedTimerRequest, ModelContractViolation>
Expand description

Normalizes RocketMQ timer properties without reading the system clock.

Property precedence matches Java RocketMQ: TIMER_DELAY_SEC, then TIMER_DELAY_MS, then TIMER_DELIVER_MS. The caller must sample now_ms once and pass that value to every adapter involved in the same admission decision.

ยงErrors

Returns a structured error for malformed input, unsupported precision, arithmetic overflow, past delivery times, and requests beyond the configured horizon.