Click or drag to resize

ActivityRecordHeartbeatAsync Method

Records a heartbeat with optional details to Cadence.

Note Note
IMPORTANT: Heartbeats are not supported for local activities.

Namespace:  Neon.Cadence
Assembly:  Neon.Cadence (in Neon.Cadence.dll) Version: 2.14.0
Syntax
public Task RecordHeartbeatAsync(
	byte[] details = null
)

Parameters

details (Optional)
Type: SystemByte
Optional heartbeart details.

Return Value

Type: Task
The tracking Task.
Exceptions
ExceptionCondition
InvalidOperationExceptionThrown for local activity executions.
Remarks

Long running activities need to send periodic heartbeats back to Cadence to prove that the activity is still alive. This can also be used by activities to implement checkpoints or record other details. This method sends a heartbeat with optional details encoded as a byte array.

Note Note
The maximum allowed time period between heartbeats is specified in ActivityOptions when activities are executed and it's also possible to enable automatic heartbeats sent by the Cadence client.
See Also