Skip to main content

Messages and Signals

Messages and signals let process instances communicate - with each other, with starting events that haven't fired yet, and with anything outside the engine that can speak HTTP. They look superficially similar in the modeler, but their delivery semantics are very different and they're not interchangeable.

AspectMessageSignal
DeliveryPoint-to-point - one publish wakes at most one subscriberBroadcast - one publish wakes every subscriber
SelectionName + correlation keysName only
Late subscribers see buffered ones?Yes, until the buffer entry is consumed or expiresYes, until the buffer entry expires
Default buffer TTL1 hour24 hours
Used forRequest/response, awaiting an external system, addressing a specific instanceAbort, mass notification, fanning out a fact to whoever cares

Modeling​

Both are declared as top-level definitions in the <definitions> root. The snippets below use the quantum: extension prefix, so declare it once on your <definitions> element:

<bpmn:definitions
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:quantum="http://quantumbpm.com/schema/quantum/bpmn/1.0"
id="Definitions_1"
targetNamespace="http://bpmn.io/schema/bpmn">

<zeebe:subscription> is accepted as a compatibility alias for <quantum:subscription>, so diagrams exported from Zeebe-based modelers deploy unchanged. Prefixes are resolved by local name. Prefer the quantum: form in new models.

<!-- Message used to correlate to an existing instance - REQUIRES correlationKey. -->
<bpmn:message id="Msg_Payment" name="PaymentReceived">
<bpmn:extensionElements>
<quantum:subscription correlationKey="orderId" />
<quantum:ttl>PT1H</quantum:ttl>
</bpmn:extensionElements>
</bpmn:message>

<!-- Message used to start new instances - correlationKey OPTIONAL. -->
<bpmn:message id="Msg_OrderCreated" name="OrderCreated"/>

<bpmn:signal id="Sig_Abort" name="AbortRequested">
<bpmn:extensionElements>
<quantum:ttl>PT30M</quantum:ttl>
</bpmn:extensionElements>
</bpmn:signal>
Strict correlation rule

Every <bpmn:message> plays exactly one role in your model:

  1. Source for a process-root start event - creates new instances. correlationKey is OPTIONAL.
  2. Anything else (intermediate catch, boundary, event-subprocess start, receive task, intermediate throw, end event) - correlates within an instance. correlationKey is REQUIRED.

Mixing the two - using the same <bpmn:message> as both a start trigger AND a catch-side correlator - is rejected at deploy time. Split into two separate <bpmn:message> definitions.

See Global definitions for the full attribute reference.

The element pages cover all the catch and throw positions where messages and signals can be used:

PositionMessage?Signal?Correlation required?
Process start event (new instance)✓✓optional
Event sub-process start✓✓required
Intermediate catch✓✓required
Intermediate throw✓✓required
Boundary event (interrupting and non-interrupting)✓✓required
End event✓-required
Receive task✓-required
Send task✓-required

For per-position attributes, see Events.


Messages​

A message is delivered to exactly one subscriber. If several catches are subscribed with the same name and correlation value when a publish arrives, the oldest subscription takes it and the rest stay registered for later publishes.

Correlation​

A message subscription matches a publish when:

  1. The names match (the resolved name from the <bpmn:message> definition).
  2. The correlation values are equal: the value the subscriber's correlationKey resolved to, and the value the publish carries.

Objects are equal when they have the same keys with equal values, in any key order. Lists are equal when their items are equal in the same order. Numbers compare by value, so 1, 1.0 and 1e0 match. A subscription whose key resolved to { orderId: 123, region: "EU" } does not match a publish that carries { orderId: 123 }.

Matching is type-sensitive: a subscription whose correlation key resolves to the number 123 does not match a publish that sends the string "123". Watch this when one side reads a JSON payload and the other reads a typed variable.

A correlation key that fails to evaluate, such as order.id while order is still a string, raises an incident instead of subscribing. Resolve it with the corrected variables and the element subscribes.

Two correlation patterns​

Both patterns use the same <quantum:subscription correlationKey> shape - the only difference is which FEEL expression you write.

Same-instance (self-correlation)​

To address the publishing instance only, use the auto-injected quantum.instanceId:

<bpmn:message id="Msg_Resume" name="ResumeAfterPause">
<bpmn:extensionElements>
<quantum:subscription correlationKey="quantum.instanceId" />
</bpmn:extensionElements>
</bpmn:message>
<!-- elsewhere in the same process -->
<bpmn:intermediateThrowEvent id="throw-resume">
<bpmn:messageEventDefinition messageRef="Msg_Resume" />
</bpmn:intermediateThrowEvent>

<bpmn:intermediateCatchEvent id="catch-resume">
<bpmn:messageEventDefinition messageRef="Msg_Resume" />
</bpmn:intermediateCatchEvent>

quantum.instanceId is the running instance's unique identifier, the instanceID the API returns - the engine surfaces it to FEEL on both throw and catch sides. Same instance ⇒ same id ⇒ correlation matches. Other instances of the same process see different ids and naturally don't correlate.

Cross-instance (application-level key)​

To bridge two instances by some domain identifier, evaluate against your own variables:

<bpmn:message id="Msg_PaymentReceived" name="PaymentReceived">
<bpmn:extensionElements>
<quantum:subscription correlationKey="orderId" />
</bpmn:extensionElements>
</bpmn:message>

A catch in an order-processing instance evaluates =orderId against its own scope and registers under, say, 42. An external publish of PaymentReceived with correlation 42 then wakes that specific instance.

Message start events​

A message start event creates a new instance of its process on a publish of the message name. A publish without correlation keys starts an instance every time.

A publish with correlation keys starts an instance only while no instance of that process that a message with the same keys started is still running. Otherwise the message waits, buffered, until that instance ends or the message's TTL runs out. Waiting messages start their instances one at a time, in arrival order. Use this to run at most one instance per key, for example one onboarding process per customer ID.

TTL​

When a message is published with no waiting subscriber, the engine buffers it. The next subscriber to register that matches the name and correlation gets the buffered message and the buffer entry is consumed.

Each buffered message carries an expiry. If nobody correlates within the TTL, the entry is dropped.

SourceNotes
Per-publish via APIPass a ttl field with the publish request. Three formats accepted: ISO 8601 duration (PT1H, P1DT12H), Go-style duration (1h30m), or RFC 3339 absolute timestamp (2026-12-31T23:59:59Z)
Per-message in the modelSet <quantum:ttl> inside the <bpmn:message> definition. Publishers inside an instance (intermediate throw, send task, message end event) use this
Server defaultUsed when neither caller nor model specifies one. 1 hour for messages

Publishing from outside the engine​

Anything that can speak HTTP can publish a message:

POST /projects/{projectID}/bpmn/messages
FieldRequiredNotes
messageNameyesThe message name catches subscribed under
correlationKeysconditionalA primitive (string / number / boolean) or an object. Required to deliver to in-flight catch / boundary / ESP / receive listeners - must equal the value the message def's correlationKey FEEL expression produces. Omit it (or send an empty object) when triggering process-root message start events that should start an instance on every publish (see Message start events).
variablesnoVariable map merged into the receiving instance's scope
ttlnoBuffer expiry, formats as above. Defaults to 1 hour
curl -X POST "$API/projects/$PROJECT/bpmn/messages" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messageName": "PaymentReceived",
"correlationKeys": 42,
"variables": { "amount": 49.95, "currency": "USD" },
"ttl": "PT1H"
}'

The same operation is available from the run panel on the instance detail page.

A test run receives messages and signals under their names with the draft: prefix, so draft:PaymentReceived reaches a test run waiting on PaymentReceived and the plain name never does. Its own throws and send tasks publish with the prefix too.


Signals​

A signal is broadcast to every subscriber that matches by name. There's no correlation - the only filter is the signal name.

<bpmn:signal id="Sig_Abort" name="AbortRequested" />
<bpmn:intermediateThrowEvent id="throw-abort">
<bpmn:signalEventDefinition signalRef="Sig_Abort" />
</bpmn:intermediateThrowEvent>

<!-- in some other process: an interrupting boundary that cancels the task on the abort -->
<bpmn:boundaryEvent id="abort-boundary" attachedToRef="long-task" cancelActivity="true">
<bpmn:outgoing>f-aborted</bpmn:outgoing>
<bpmn:signalEventDefinition signalRef="Sig_Abort" />
</bpmn:boundaryEvent>

Every running process that catches Sig_Abort receives it.

Buffer and TTL​

Signals have a buffer too, but the semantics differ from messages:

  • A buffered signal is not consumed when a subscriber reads it. Late subscribers can still pick up a recent signal as long as the buffer entry is alive.
  • The default TTL for signal buffer entries is 24 hours, deliberately longer than the message default.
  • TTL accepts the same three formats as messages: ISO 8601 duration, Go duration, or RFC 3339 timestamp.
  • A publish through the API sets its own ttl, a signal thrown in a process uses its definition's <quantum:ttl>, and without either the 24 hour default applies.

Publishing from outside the engine​

POST /projects/{projectID}/bpmn/signals
FieldRequiredNotes
signalNameyesThe signal name
variablesnoVariable map merged into each receiving instance
ttlnoBuffer expiry. Defaults to 24 hours
curl -X POST "$API/projects/$PROJECT/bpmn/signals" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"signalName": "AbortRequested",
"variables": { "reason": "operator-cancelled" }
}'

The same operation is available from the run panel.


Choosing between them​

A few patterns to keep in mind:

You want to…Use
Wake one specific instance by some application keyMessage with cross-instance correlation (correlationKey="orderId" etc.)
Coordinate two parts of the same processMessage with self-correlation (correlationKey="quantum.instanceId")
Tell every running instance "stop now"Signal
Notify all instances of a config changeSignal
Receive a callback from an external system about a specific requestMessage with correlation on the request ID
Trigger a new process instance from an external systemMessage start event (correlation optional)
Run at most one instance per keyMessage start event, published with that key as correlation

Both are delivered only within the project they are published in. Inside a project, names are matched as-is, so prefix conventions (OrderProcess.PaymentReceived) help avoid collisions.