Class AmqpClientOptions


public class AmqpClientOptions extends io.vertx.proton.ProtonClientOptions
Configures the AMQP Client. You can also configure the underlying Proton instance. Refer to ProtonClientOptions for details.
  • Constructor Details

    • AmqpClientOptions

      public AmqpClientOptions()
    • AmqpClientOptions

      public AmqpClientOptions(JsonObject json)
    • AmqpClientOptions

      public AmqpClientOptions(AmqpClientOptions other)
  • Method Details

    • toJson

      public JsonObject toJson()
      Description copied from class: ClientOptionsBase
      Convert to JSON
      Overrides:
      toJson in class io.vertx.proton.ProtonClientOptions
      Returns:
      the JSON
    • getHost

      public String getHost()
      Returns:
      the host.
    • setHost

      public AmqpClientOptions setHost(String host)
      Sets the host.
      Parameters:
      host - the host, must not be null when the client attempt to connect. Defaults to system variable amqp-client-host and to AMQP_CLIENT_HOST environment variable
      Returns:
      the current AmqpClientOptions
    • getPort

      public int getPort()
      Returns:
      the port.
    • setPort

      public AmqpClientOptions setPort(int port)
      Sets the port.
      Parameters:
      port - the port, defaults to system variable amqp-client-port and to AMQP_CLIENT_PORT environment variable and if neither is set 5672.
      Returns:
      the current AmqpClientOptions
    • getUsername

      public String getUsername()
      Returns:
      the username
    • setUsername

      public AmqpClientOptions setUsername(String username)
      Sets the username.
      Parameters:
      username - the username, defaults to system variable amqp-client-username and to AMQP_CLIENT_USERNAME environment variable.
      Returns:
      the current AmqpClientOptions
    • getPassword

      public String getPassword()
      Returns:
      the password
    • setPassword

      public AmqpClientOptions setPassword(String pwd)
      Sets the password.
      Parameters:
      pwd - the password, defaults to system variable amqp-client-password and to AMQP_CLIENT_PASSWORD environment variable.
      Returns:
      the current AmqpClientOptions
    • getContainerId

      public String getContainerId()
      Returns:
      the container id.
    • setContainerId

      public AmqpClientOptions setContainerId(String containerId)
      Sets the container id.
      Parameters:
      containerId - the container id
      Returns:
      the current AmqpClientOptions
    • getConnectionHostname

      public String getConnectionHostname()
      Get the connection hostname override for the AMQP Open frame hostname
      Returns:
      the hostname override
    • setConnectionHostname

      public AmqpClientOptions setConnectionHostname(String hostname)
      Explicitly override the hostname value used for the AMQP Open frame. The host connected to as per setHost(String) will be used in the Open frame by default.
      Parameters:
      hostname - the hostname override value to use as the Open frame hostname
      Returns:
      current AmqpClientOptions instance
    • addEnabledSaslMechanism

      public AmqpClientOptions addEnabledSaslMechanism(String saslMechanism)
      Overrides:
      addEnabledSaslMechanism in class io.vertx.proton.ProtonClientOptions
      See Also:
      • ProtonClientOptions.addEnabledSaslMechanism(String)
    • setSendBufferSize

      public AmqpClientOptions setSendBufferSize(int sendBufferSize)
      Description copied from class: NetworkOptions
      Set the TCP send buffer size
      Overrides:
      setSendBufferSize in class io.vertx.proton.ProtonClientOptions
      Parameters:
      sendBufferSize - the buffers size, in bytes
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setSendBufferSize(int)
    • setReceiveBufferSize

      public AmqpClientOptions setReceiveBufferSize(int receiveBufferSize)
      Description copied from class: NetworkOptions
      Set the TCP receive buffer size
      Overrides:
      setReceiveBufferSize in class io.vertx.proton.ProtonClientOptions
      Parameters:
      receiveBufferSize - the buffers size, in bytes
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setReceiveBufferSize(int)
    • setReuseAddress

      public AmqpClientOptions setReuseAddress(boolean reuseAddress)
      Description copied from class: NetworkOptions
      Set the value of reuse address
      Overrides:
      setReuseAddress in class io.vertx.proton.ProtonClientOptions
      Parameters:
      reuseAddress - the value of reuse address
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setReuseAddress(boolean)
    • setTrafficClass

      public AmqpClientOptions setTrafficClass(int trafficClass)
      Description copied from class: NetworkOptions
      Set the value of traffic class
      Overrides:
      setTrafficClass in class io.vertx.proton.ProtonClientOptions
      Parameters:
      trafficClass - the value of traffic class
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setTrafficClass(int)
    • setTcpNoDelay

      public AmqpClientOptions setTcpNoDelay(boolean tcpNoDelay)
      Description copied from class: TCPSSLOptions
      Set whether TCP no delay is enabled
      Overrides:
      setTcpNoDelay in class io.vertx.proton.ProtonClientOptions
      Parameters:
      tcpNoDelay - true if TCP no delay is enabled (Nagle disabled)
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setTcpNoDelay(boolean)
    • setTcpKeepAlive

      public AmqpClientOptions setTcpKeepAlive(boolean tcpKeepAlive)
      Description copied from class: TCPSSLOptions
      Set whether TCP keep alive is enabled
      Overrides:
      setTcpKeepAlive in class io.vertx.proton.ProtonClientOptions
      Parameters:
      tcpKeepAlive - true if TCP keep alive is enabled
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setTcpKeepAlive(boolean)
    • setSoLinger

      public AmqpClientOptions setSoLinger(int soLinger)
      Description copied from class: TCPSSLOptions
      Set whether SO_linger keep alive is enabled
      Overrides:
      setSoLinger in class io.vertx.proton.ProtonClientOptions
      Parameters:
      soLinger - true if SO_linger is enabled
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setSoLinger(int)
    • setIdleTimeout

      public AmqpClientOptions setIdleTimeout(int idleTimeout)
      Description copied from class: TCPSSLOptions
      Set the idle timeout, default time unit is seconds. Zero means don't timeout. This determines if a connection will timeout and be closed if no data is received nor sent within the timeout. If you want change default time unit, use TCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
      Overrides:
      setIdleTimeout in class io.vertx.proton.ProtonClientOptions
      Parameters:
      idleTimeout - the timeout
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setIdleTimeout(int)
    • setIdleTimeoutUnit

      public AmqpClientOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
      Description copied from class: TCPSSLOptions
      Set the idle timeout unit. If not specified, default is seconds.
      Overrides:
      setIdleTimeoutUnit in class io.vertx.proton.ProtonClientOptions
      Parameters:
      idleTimeoutUnit - specify time unit.
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setIdleTimeoutUnit(TimeUnit)
    • setSsl

      public AmqpClientOptions setSsl(boolean ssl)
      Description copied from class: TCPSSLOptions
      Set whether SSL/TLS is enabled
      Overrides:
      setSsl in class io.vertx.proton.ProtonClientOptions
      Parameters:
      ssl - true if enabled
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setSsl(boolean)
    • setSslHandshakeTimeout

      public AmqpClientOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
      Description copied from class: TCPSSLOptions
      Set the SSL handshake timeout, default time unit is seconds.
      Overrides:
      setSslHandshakeTimeout in class io.vertx.proton.ProtonClientOptions
      Parameters:
      sslHandshakeTimeout - the SSL handshake timeout to set, in milliseconds
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • invalid reference
        ProtonClientOptions#setSslHandshakeTimeout(boolean)
    • setSslHandshakeTimeoutUnit

      public AmqpClientOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
      Description copied from class: TCPSSLOptions
      Set the SSL handshake timeout unit. If not specified, default is seconds.
      Overrides:
      setSslHandshakeTimeoutUnit in class io.vertx.proton.ProtonClientOptions
      Parameters:
      sslHandshakeTimeoutUnit - specify time unit.
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setSslHandshakeTimeoutUnit(TimeUnit)
    • setKeyCertOptions

      public AmqpClientOptions setKeyCertOptions(KeyCertOptions options)
      Description copied from class: TCPSSLOptions
      Set the key/cert options.
      Overrides:
      setKeyCertOptions in class io.vertx.proton.ProtonClientOptions
      Parameters:
      options - the key store options
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setKeyCertOptions(KeyCertOptions)
    • setTrustOptions

      public AmqpClientOptions setTrustOptions(TrustOptions options)
      Description copied from class: TCPSSLOptions
      Set the trust options.
      Overrides:
      setTrustOptions in class io.vertx.proton.ProtonClientOptions
      Parameters:
      options - the trust options
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setTrustOptions(TrustOptions)
    • addEnabledCipherSuite

      public AmqpClientOptions addEnabledCipherSuite(String suite)
      Description copied from class: TCPSSLOptions
      Add an enabled cipher suite, appended to the ordered suites.
      Overrides:
      addEnabledCipherSuite in class io.vertx.proton.ProtonClientOptions
      Parameters:
      suite - the suite
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.addEnabledCipherSuite(String)
    • addCrlPath

      public AmqpClientOptions addCrlPath(String crlPath)
      Description copied from class: TCPSSLOptions
      Add a CRL path
      Overrides:
      addCrlPath in class io.vertx.proton.ProtonClientOptions
      Parameters:
      crlPath - the path
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.addCrlPath(String)
    • addCrlValue

      public AmqpClientOptions addCrlValue(Buffer crlValue)
      Description copied from class: TCPSSLOptions
      Add a CRL value
      Overrides:
      addCrlValue in class io.vertx.proton.ProtonClientOptions
      Parameters:
      crlValue - the value
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.addCrlValue(Buffer)
    • setTrustAll

      public AmqpClientOptions setTrustAll(boolean trustAll)
      Description copied from class: ClientOptionsBase
      Set whether all server certificates should be trusted
      Overrides:
      setTrustAll in class io.vertx.proton.ProtonClientOptions
      Parameters:
      trustAll - true if all should be trusted
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setTrustAll(boolean)
    • setConnectTimeout

      public AmqpClientOptions setConnectTimeout(int connectTimeout)
      Description copied from class: ClientOptionsBase
      Set the connect timeout
      Overrides:
      setConnectTimeout in class io.vertx.proton.ProtonClientOptions
      Parameters:
      connectTimeout - connect timeout, in ms
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setConnectTimeout(int)
    • setReconnectAttempts

      public AmqpClientOptions setReconnectAttempts(int attempts)
      Description copied from class: NetClientOptions
      Set the value of reconnect attempts
      Overrides:
      setReconnectAttempts in class io.vertx.proton.ProtonClientOptions
      Parameters:
      attempts - the maximum number of reconnect attempts
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setReconnectAttempts(int)
    • setReconnectInterval

      public AmqpClientOptions setReconnectInterval(long interval)
      Description copied from class: NetClientOptions
      Set the reconnect interval
      Overrides:
      setReconnectInterval in class io.vertx.proton.ProtonClientOptions
      Parameters:
      interval - the reconnect interval in ms
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setReconnectInterval(long)
    • addEnabledSecureTransportProtocol

      public AmqpClientOptions addEnabledSecureTransportProtocol(String protocol)
      Description copied from class: TCPSSLOptions
      Add an enabled SSL/TLS protocols, appended to the ordered protocols.
      Overrides:
      addEnabledSecureTransportProtocol in class io.vertx.proton.ProtonClientOptions
      Parameters:
      protocol - the SSL/TLS protocol to enable
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.addEnabledSecureTransportProtocol(String)
    • setHostnameVerificationAlgorithm

      public AmqpClientOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
      Description copied from class: NetClientOptions
      Set the hostname verification algorithm interval To disable hostname verification, set hostnameVerificationAlgorithm to an empty String
      Overrides:
      setHostnameVerificationAlgorithm in class io.vertx.proton.ProtonClientOptions
      Parameters:
      hostnameVerificationAlgorithm - should be HTTPS, LDAPS or an empty String
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setHostnameVerificationAlgorithm(String)
    • setSslEngineOptions

      public AmqpClientOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
      Description copied from class: TCPSSLOptions
      Set to use SSL engine implementation to use.
      Overrides:
      setSslEngineOptions in class io.vertx.proton.ProtonClientOptions
      Parameters:
      sslEngineOptions - the ssl engine to use
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setSslEngineOptions(SSLEngineOptions)
    • setLocalAddress

      public AmqpClientOptions setLocalAddress(String localAddress)
      Description copied from class: ClientOptionsBase
      Set the local interface to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.
      Overrides:
      setLocalAddress in class io.vertx.proton.ProtonClientOptions
      Parameters:
      localAddress - the local address
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setLocalAddress(String)
    • setReusePort

      public AmqpClientOptions setReusePort(boolean reusePort)
      Description copied from class: NetworkOptions
      Set the value of reuse port.

      This is only supported by native transports.

      Overrides:
      setReusePort in class io.vertx.proton.ProtonClientOptions
      Parameters:
      reusePort - the value of reuse port
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setReusePort(boolean)
    • setTcpCork

      public AmqpClientOptions setTcpCork(boolean tcpCork)
      Description copied from class: TCPSSLOptions
      Enable the TCP_CORK option - only with linux native transport.
      Overrides:
      setTcpCork in class io.vertx.proton.ProtonClientOptions
      Parameters:
      tcpCork - the cork value
      See Also:
      • ProtonClientOptions.setTcpCork(boolean)
    • setTcpFastOpen

      public AmqpClientOptions setTcpFastOpen(boolean tcpFastOpen)
      Description copied from class: TCPSSLOptions
      Enable the TCP_FASTOPEN option - only with linux native transport.
      Overrides:
      setTcpFastOpen in class io.vertx.proton.ProtonClientOptions
      Parameters:
      tcpFastOpen - the fast open value
      See Also:
      • ProtonClientOptions.setTcpFastOpen(boolean)
    • setTcpQuickAck

      public AmqpClientOptions setTcpQuickAck(boolean tcpQuickAck)
      Description copied from class: TCPSSLOptions
      Enable the TCP_QUICKACK option - only with linux native transport.
      Overrides:
      setTcpQuickAck in class io.vertx.proton.ProtonClientOptions
      Parameters:
      tcpQuickAck - the quick ack value
      See Also:
      • ProtonClientOptions.setTcpQuickAck(boolean)
    • removeEnabledSecureTransportProtocol

      public AmqpClientOptions removeEnabledSecureTransportProtocol(String protocol)
      Description copied from class: TCPSSLOptions
      Removes an enabled SSL/TLS protocol from the ordered protocols.
      Overrides:
      removeEnabledSecureTransportProtocol in class io.vertx.proton.ProtonClientOptions
      Parameters:
      protocol - the SSL/TLS protocol to disable
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.removeEnabledSecureTransportProtocol(String)
    • setEnabledSecureTransportProtocols

      public AmqpClientOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
      Description copied from class: TCPSSLOptions
      Sets the list of enabled SSL/TLS protocols.
      Overrides:
      setEnabledSecureTransportProtocols in class io.vertx.proton.ProtonClientOptions
      Parameters:
      enabledSecureTransportProtocols - the SSL/TLS protocols to enable
      Returns:
      a reference to this, so the API can be used fluently
      See Also:
      • ProtonClientOptions.setEnabledSecureTransportProtocols(Set)
    • setVirtualHost

      public AmqpClientOptions setVirtualHost(String virtualHost)
      Overrides:
      setVirtualHost in class io.vertx.proton.ProtonClientOptions
      See Also:
      • ProtonClientOptions.setVirtualHost(String)
    • setSniServerName

      public AmqpClientOptions setSniServerName(String sniServerName)
      Overrides:
      setSniServerName in class io.vertx.proton.ProtonClientOptions
      See Also:
      • ProtonClientOptions.setSniServerName(String)
    • setHeartbeat

      public AmqpClientOptions setHeartbeat(int heartbeat)
      Overrides:
      setHeartbeat in class io.vertx.proton.ProtonClientOptions
      See Also:
      • ProtonClientOptions.setHeartbeat(int)
    • setMaxFrameSize

      public AmqpClientOptions setMaxFrameSize(int maxFrameSize)
      Overrides:
      setMaxFrameSize in class io.vertx.proton.ProtonClientOptions
      See Also:
      • ProtonClientOptions.setMaxFrameSize(int)