Skip to main content
You can use the Integration API to turn any source of events into Restate invocations.

Integration client

Use an integration client to send invocations to Restate using the Integration API.
Add dev.restate:integration-client to your dependencies.

Create a client

Create one client for your Restate ingress URL and close it when your integration shuts down:
Java

Simple producer

Use Producer when your source does not provide stable offsets that you can replay. The client assigns an offset to each invocation. Call flush() before closing the producer to wait until Restate has durably committed everything you sent:
Java

Exactly once producer

Use ExactlyOnceProducer when your source provides stable, strictly increasing offsets, and choose a producer ID that remains stable across restarts and is unique to that offset sequence. After flush() returns, you can checkpoint the returned offset in your source:
Java
Producers accept InvocationMetadata when every invocation shares fields such as the target service, handler, or headers. Set defaults to avoid sending over and over the same fields in every invocation.Fields set on an individual invocation override these defaults.
Java
For configuration options and advanced usage, see the Integration client Javadocs.
Java is currently the only supported integration client. We plan to add more in future.