Hi,
I am just getting started with Temporal and I am interested in deploying Temporal in a containerized environment, like Kubernetes. I have a few general questions at the outset, which I could not answer by looking at the docs so far.
My mental model is that a general deployment may have a number of worker processes, each of which may contain multiple worker entities. Each worker entity is listening on one task queue, but the same task queue may be listened by multiple workers, in which case all those workers must have identical activities/workflows.
- Say workflow W has activities A and B. The workflow invokes each activity with specific activity options:
ctx = workflow.WithActivityOptions(ctx, options)
whereoptions
include retry policies and various timeouts. Instead of hardcoding the options, I’d like to pass them to the workflow in some form: one set of options for each activity, for each invocation for the workflow. To make this concrete, let’s say this could be a YAML document:
activity-1:
retryPolicy:
initialInterval: 1
. . .
timeouts:
startToClose: ...
activity-2:
...
We want to pass this somehow from the workflow client, something like:
wfclient.ExecuteWorkflow(ctx, workflowOptions, myWorkflow, myParam)
How do I pass the activity options for each activity of the workflow from the workflow client?
- Along the same lines, I want to pass a different set of app-specific parameters to each activity in each workflow invocation. IOW, in every call in a workflow like
workflow.ExecuteActivity(ctx, myActivity1, myParam)
, themyParam
may be different and that should be specified in the workflow client. How do we do that?
Thanks in advance.
Regards,
Sundar