Each invocation has its own unique ID and lifecycle.
Have a look at managing invocations to learn how to manage the lifecycle of an invocation.
Always invoke handlers via the context, if you have access to it.
Restate then attaches information about the invocation to the parent invocation.
Installation
First, add the dependency to your projectRequest-response invocations
To wait on a response from the handler:One-way invocations
To send a message without waiting for a response:Delayed invocations
To schedule an invocation for a later point in time:Invoke a handler idempotently
By using Restate and an idempotency key, you can make any service call idempotent, without any extra code or setup. This is a very powerful feature to ensure that your system stays consistent and doesn’t perform the same operation multiple times. To make a service call idempotent, you can use the idempotency key feature. Add the idempotency key to the header via:Check out the service configuration docs to tune the retention time.
Retrieve result of invocations and workflows
You can use the client library to retrieve the results of invocations with an idempotency key or workflows.Attach to an invocation with an idempotency key
For invocations with an idempotency key, you can attach to the invocation and wait for it to finish:Attach/peek at a workflow execution
For workflows, you can attach to the workflow execution and wait for it to finish or peek at the output:Flow control: scope and limit key
Scope and limit key are a preview feature and require restate-server 1.7 with flow control enabled.
.scope(...) on the client, and add a limitKey for a finer, per subgroup limit within that scope: