File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
core/src/main/java/io/temporal/samples/autoheartbeat Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ # Auto-heartbeating sample for activities that define HeartbeatTimeout
2+
3+ This sample shows an implementation of an "auto-heartbeating" utility that can be applied via interceptor
4+ to all activities where you define HeartbeatTimeout. Use case where this can be helpful include
5+ situations where you have long-running activities where you want to heartbeat but its difficult
6+ to explicitly call heartbeat api in activity code directly.
7+
8+ 1 . Start the Sample:
9+ ``` bash
10+ ./gradlew -q execute -PmainClass=io.temporal.samples.autoheartbeat.Starter
11+ ```
12+
13+ The sample workflow starts three activities async, two of which define heartbeat timeout.
14+ Activity interceptor in this sample applies the auto-heartbeating util to the two that define heartbeat timeout
15+ and auto-heartbeats at its HeartbeatTimeout - 1s intervals.
You can’t perform that action at this time.
0 commit comments