If we have an activity that communicate with https://server-1.com (for example)
if request fails for any reason, we need to fail the activity & retry but with https://server-2.com (for example)
Is that achievable with Temporal?
If we have an activity that communicate with https://server-1.com (for example)
if request fails for any reason, we need to fail the activity & retry but with https://server-2.com (for example)
Is that achievable with Temporal?
Some ways to achieve this:
activity.GetInfo(ctx).Attempt
to learn this.Given that our activity is running in a session (so each retry will be done on same worker)
Can we use activity.RecordHeartbeat
to preserve some state between retries?
We don’t set HeartbeatTimeout
, So heartbeats won’t be send to the Temporal Server as I get from docs
The question is: As we’re running in a session, if activity retry called activity.GetHeartbeatDetails
Will it be able to get the details recored by previous run on the same worker although HeartbeatTimeout
is not configured?
I believe details are flushed before reporting an activity failure. But I’m not sure if heartbeat timeout is still required.