Interface IntegrationClient

All Superinterfaces:
AutoCloseable

@Experimental public interface IntegrationClient extends AutoCloseable
Entry point for producing invocations to Restate ingress over the ingestion API.
  • Method Details

    • newProducer

      default Producer newProducer()
      Creates at-least-once Producer with no stream defaults.
      Returns:
      a new producer
    • newProducer

      default Producer newProducer(InvocationMetadata defaultMetadata)
      Creates at-least-once Producer with the given stream defaults.
      Parameters:
      defaultMetadata - invocation fields applied to every record unless overridden per record
      Returns:
      a new producer
      Throws:
      NullPointerException - if defaultMetadata is null
    • newProducer

      Producer newProducer(ProducerOptions options)
      Creates an at-least-once Producer with the given options.
      Parameters:
      options - producer buffering, blocking, and invocation-default options
      Returns:
      a new producer
      Throws:
      NullPointerException - if options is null
    • newExactlyOnceProducer

      default ExactlyOnceProducer newExactlyOnceProducer(String producerId)
      Creates an ExactlyOnceProducer identified by producerId.
      Parameters:
      producerId - stable identity of the producer; must be non-empty
      Returns:
      a new exactly-once producer
      Throws:
      IllegalArgumentException - if producerId is null or blank
    • newExactlyOnceProducer

      default ExactlyOnceProducer newExactlyOnceProducer(String producerId, InvocationMetadata defaultMetadata)
      Creates an ExactlyOnceProducer identified by producerId with the given stream defaults.
      Parameters:
      producerId - stable identity of the producer; must be non-empty
      defaultMetadata - invocation fields applied to every record unless overridden per record
      Returns:
      a new exactly-once producer
      Throws:
      IllegalArgumentException - if producerId is null or blank
      NullPointerException - if defaultMetadata is null
    • newExactlyOnceProducer

      ExactlyOnceProducer newExactlyOnceProducer(String producerId, ProducerOptions options)
      Creates an ExactlyOnceProducer identified by producerId with the given options.
      Parameters:
      producerId - stable identity of the producer; must be non-empty
      options - producer buffering, blocking, and invocation-default options
      Returns:
      a new exactly-once producer
      Throws:
      IllegalArgumentException - if producerId is null or blank
      NullPointerException - if options is null
    • close

      void close()
      Shuts down the underlying client. Flush and close any producers first when their accepted invocations must be durably committed.
      Specified by:
      close in interface AutoCloseable
    • builder

      static IntegrationClient.Builder builder(String ingressUrl)
      Start building a client that connects to the ingress at target (an http(s) URL).