Message Envelope

Metadata carried with messages for AI workflows.

In DriftQ-Core, a message can carry an envelope — metadata that travels with the message and controls how it should be handled.

Mental model: payload = the work, envelope = the rules around that work.

Common envelope fields

An envelope can include fields like:

  • tenant_id — multi-tenant separation / accounting
  • idempotency_key — prevents duplicate side effects across retries
  • deadline — stop doing this work after a certain point in time
  • retry_policy — max attempts + backoff parameters

Why these matter

They let producers define reliability and safety expectations once, and DriftQ-Core enforces them consistently.

Why the envelope is a big deal

The envelope is the “control plane” for the message. It’s also how DriftQ evolves beyond a broker: it becomes the foundation for routing decisions, safety constraints, and workflow control.

  • Routing: policy-driven routing / partitions / priority
  • Retries: consistent backoff + termination rules
  • Budgets: cost caps, rate limits, tenant quotas
  • Tracing: end-to-end workflow/agent tracing metadata

Roadmap note: DriftQ-Core is the broker repo you can run today. The envelope is what enables DriftQ (the overall project) to grow into a workflow runtime in v2+.