Temporal Standalone Activity heartbeats: resume polling a Sume job

Heartbeats signal liveness and checkpoint progress for retries. Put the Sume job_id in the heartbeat so a retry resumes polling instead of paying again.

5 min readSume
All posts

If a Temporal Standalone Activity polls a Sume job, heartbeat on every poll with the job_id in the heartbeat details, so a retried attempt can read it back and resume polling the same job instead of submitting a new one. Temporal's Standalone Activity page says heartbeats let a long-running job signal liveness and also checkpoint progress for retries.

The Temporal behavior is from its Standalone Activity documentation, read 2026-10-03; Sume's polling rules are from Jobs and results and Generation admission. I did not run this against Sume, and the page does not say how large heartbeat details may be.

How should the heartbeat and the poll fit together?

Sume's status response carries next_poll_after_seconds when it has a hint, and the docs say to back off exponentially when it does not. Heartbeat after each status read, and set the Heartbeat timeout comfortably above the longest sleep your loop can take, which is your own backoff cap or the largest hint you see. A heartbeat timeout shorter than one sleep makes Temporal declare a healthy poller dead.

A queued job is normal: for paid generation Sume accepts valid jobs as queued while queue capacity remains, so a long gap before processing is not a failure. Stop on terminal, read result_url once result_ready is true, and read the failure from the job record on failed or canceled.

Heartbeat design from Temporal's page and Sume's docs, read 2026-10-03.
QuestionAnswerSource
What goes in the heartbeatjob_id and the last status seenTemporal says heartbeats checkpoint progress
When a retry startsRead the job_id; if present, poll it; if absent, submit with the Idempotency-KeySume: do not resubmit because a process timed out
Heartbeat intervalAfter every status readSume: honor next_poll_after_seconds
Heartbeat timeoutAbove your longest sleepYour own backoff cap
Stop conditionterminal is trueSume job statuses completed, failed, canceled

What happens to the job if the Activity is canceled?

Nothing happens to it automatically. A client-side stop does not cancel a Sume job; it keeps running and billing until you call POST /v1/jobs/{id}/cancel, which succeeds only before generation starts and otherwise returns 409 job_generation_already_started. Put the cancel call in your own cancellation handler if you want queued work to stop.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume