Class GrpcClientConfiguration

java.lang.Object
io.quarkus.grpc.runtime.config.GrpcClientConfiguration

public class GrpcClientConfiguration extends Object
  • Field Details

    • DNS

      public static final String DNS
      See Also:
    • XDS

      public static final String XDS
      See Also:
    • useQuarkusGrpcClient

      @ConfigItem(defaultValue="false") public boolean useQuarkusGrpcClient
      Use new Vert.x gRPC client support. By default, we still use previous Java gRPC support.
    • xds

      Configure XDS usage, if enabled.
    • inProcess

      @ConfigItem public InProcess inProcess
      Configure InProcess usage, if enabled.
    • stork

      @ConfigItem public StorkConfig stork
      Configure Stork usage with new Vert.x gRPC, if enabled.
    • port

      @ConfigItem(defaultValue="9000") public int port
      The gRPC service port.
    • testPort

      @ConfigItem public OptionalInt testPort
      The gRPC service test port.
    • host

      @ConfigItem(defaultValue="localhost") public String host
      The host name / IP on which the service is exposed.
    • ssl

      public SslClientConfig ssl
      The SSL/TLS config. Only use this if you want to use the old Java gRPC client.
    • tlsConfigurationName

      @ConfigItem public Optional<String> tlsConfigurationName
      The name of the TLS configuration to use.

      If not set and the default TLS configuration is configured (quarkus.tls.*) then that will be used. If a name is configured, it uses the configuration from quarkus.tls.<name>.* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.

      If no TLS configuration is set, and quarkus.tls.* is not configured, then, `quarkus.grpc.clients.$client-name.tls` will be used.

      Important: This is only supported when using the Quarkus (Vert.x-based) gRPC client.

    • tls

      public TlsClientConfig tls
      The TLS config. Only use this if you want to use the Quarkus gRPC client.
    • nameResolver

      @ConfigItem(defaultValue="dns") public String nameResolver
      Use a name resolver. Defaults to dns. If set to "stork", host will be treated as SmallRye Stork service name
    • plainText

      @ConfigItem public Optional<Boolean> plainText
      Whether plain-text should be used instead of TLS. Enabled by default, except if TLS/SSL is configured. In this case, plain-text is disabled.
    • keepAliveTime

      @ConfigItem public Optional<Duration> keepAliveTime
      The duration after which a keep alive ping is sent.
    • flowControlWindow

      @ConfigItem public OptionalInt flowControlWindow
      The flow control window in bytes. Default is 1MiB.
    • idleTimeout

      @ConfigItem public Optional<Duration> idleTimeout
      The duration without ongoing RPCs before going to idle mode.
    • keepAliveTimeout

      @ConfigItem public Optional<Duration> keepAliveTimeout
      The amount of time the sender of a keep alive ping waits for an acknowledgement.
    • keepAliveWithoutCalls

      @ConfigItem(defaultValue="false") public boolean keepAliveWithoutCalls
      Whether keep-alive will be performed when there are no outstanding RPC on a connection.
    • maxHedgedAttempts

      @ConfigItem(defaultValue="5") public int maxHedgedAttempts
      The max number of hedged attempts.
    • maxRetryAttempts

      @ConfigItem(defaultValue="5") public int maxRetryAttempts
      The max number of retry attempts. Retry must be explicitly enabled.
    • maxTraceEvents

      @ConfigItem public OptionalInt maxTraceEvents
      The maximum number of channel trace events to keep in the tracer for each channel or sub-channel.
    • maxInboundMessageSize

      @ConfigItem public OptionalInt maxInboundMessageSize
      The maximum message size allowed for a single gRPC frame (in bytes). Default is 4 MiB.
    • maxInboundMetadataSize

      @ConfigItem public OptionalInt maxInboundMetadataSize
      The maximum size of metadata allowed to be received (in bytes). Default is 8192B.
    • negotiationType

      @ConfigItem(defaultValue="TLS") public String negotiationType
      The negotiation type for the HTTP/2 connection. Accepted values are: TLS, PLAINTEXT_UPGRADE, PLAINTEXT
    • overrideAuthority

      @ConfigItem public Optional<String> overrideAuthority
      Overrides the authority used with TLS and HTTP virtual hosting.
    • perRpcBufferLimit

      @ConfigItem public OptionalLong perRpcBufferLimit
      The per RPC buffer limit in bytes used for retry.
    • retry

      @ConfigItem(defaultValue="false") public boolean retry
      Whether retry is enabled. Note that retry is disabled by default.
    • retryBufferSize

      @ConfigItem public OptionalLong retryBufferSize
      The retry buffer size in bytes.
    • userAgent

      @ConfigItem public Optional<String> userAgent
      Use a custom user-agent.
    • loadBalancingPolicy

      @ConfigItem(defaultValue="pick_first") public String loadBalancingPolicy
      Use a custom load balancing policy. Accepted values are: pick_first, round_robin, grpclb. This value is ignored if name-resolver is set to 'stork'.
    • compression

      @ConfigItem public Optional<String> compression
      The compression to use for each call. The accepted values are gzip and identity.
    • deadline

      @ConfigItem public Optional<Duration> deadline
      The deadline used for each call.
  • Constructor Details

    • GrpcClientConfiguration

      public GrpcClientConfiguration()