Integration client
Use an integration client to send invocations to Restate using the Integration API.- Java
Add
For configuration options and advanced usage, see the Integration client Javadocs.
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
UseProducer 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
UseExactlyOnceProducer 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
Producer default fields
Producer default fields
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
Java is currently the only supported integration client. We plan to add more in future.