pub fn props_for(
envelope: &Envelope,
delay: Option<Duration>,
) -> BasicPropertiesExpand description
AMQP properties for publishing envelope.
content-typeisapplication/json, matchingEnvelope::to_bytes.delivery-modeis2(persistent).message-idis the job id, stable across retries.typeis the job type.priorityisEnvelope::priority, always set. Normal work carries0; a deferred envelope carries its queue’s top level so it overtakes the backlog. A queue declared withoutx-max-priorityignores the property, and a priority above the queue’sx-max-priorityis treated by the broker as that maximum, so this is safe to set unconditionally.expirationis set only whendelayisSome, and is the delay in whole milliseconds rounded up (seeexpiration_ms).