Interface IntegrationClient
- All Superinterfaces:
AutoCloseable
Entry point for producing invocations to Restate ingress over the ingestion API.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegrationClient.BuilderStart building a client that connects to the ingress attarget(an http(s) URL).voidclose()Shuts down the underlying client.default ExactlyOnceProducernewExactlyOnceProducer(String producerId) Creates anExactlyOnceProduceridentified byproducerId.default ExactlyOnceProducernewExactlyOnceProducer(String producerId, InvocationMetadata defaultMetadata) Creates anExactlyOnceProduceridentified byproducerIdwith the given stream defaults.newExactlyOnceProducer(String producerId, ProducerOptions options) Creates anExactlyOnceProduceridentified byproducerIdwith the given options.default ProducerCreates at-least-onceProducerwith no stream defaults.default ProducernewProducer(InvocationMetadata defaultMetadata) Creates at-least-onceProducerwith the given stream defaults.newProducer(ProducerOptions options) Creates an at-least-onceProducerwith the given options.
-
Method Details
-
newProducer
-
newProducer
Creates at-least-onceProducerwith the given stream defaults.- Parameters:
defaultMetadata- invocation fields applied to every record unless overridden per record- Returns:
- a new producer
- Throws:
NullPointerException- ifdefaultMetadataisnull
-
newProducer
Creates an at-least-onceProducerwith the given options.- Parameters:
options- producer buffering, blocking, and invocation-default options- Returns:
- a new producer
- Throws:
NullPointerException- ifoptionsisnull
-
newExactlyOnceProducer
Creates anExactlyOnceProduceridentified byproducerId.- Parameters:
producerId- stable identity of the producer; must be non-empty- Returns:
- a new exactly-once producer
- Throws:
IllegalArgumentException- ifproducerIdisnullor blank
-
newExactlyOnceProducer
default ExactlyOnceProducer newExactlyOnceProducer(String producerId, InvocationMetadata defaultMetadata) Creates anExactlyOnceProduceridentified byproducerIdwith the given stream defaults.- Parameters:
producerId- stable identity of the producer; must be non-emptydefaultMetadata- invocation fields applied to every record unless overridden per record- Returns:
- a new exactly-once producer
- Throws:
IllegalArgumentException- ifproducerIdisnullor blankNullPointerException- ifdefaultMetadataisnull
-
newExactlyOnceProducer
Creates anExactlyOnceProduceridentified byproducerIdwith the given options.- Parameters:
producerId- stable identity of the producer; must be non-emptyoptions- producer buffering, blocking, and invocation-default options- Returns:
- a new exactly-once producer
- Throws:
IllegalArgumentException- ifproducerIdisnullor blankNullPointerException- ifoptionsisnull
-
close
void close()Shuts down the underlying client. Flush and close any producers first when their accepted invocations must be durably committed.- Specified by:
closein interfaceAutoCloseable
-
builder
Start building a client that connects to the ingress attarget(an http(s) URL).
-