io.vertx.rabbitmq

## Class RabbitMQOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.ClientOptionsBase
      - - io.vertx.core.net.NetClientOptions
        - - io.vertx.rabbitmq.RabbitMQOptions

-     public class RabbitMQOptions
      extends NetClientOptions

  RabbitMQ client options, most
  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_AUTOMATIC_RECOVERY_ENABLED` The default automatic recovery enabled = `false`
    `static int` | `DEFAULT_CONNECTION_TIMEOUT` The default connection timeout = `60000`
    `static int` | `DEFAULT_HANDSHAKE_TIMEOUT` The default handshake timeout = `10000`
    `static String` | `DEFAULT_HOST` The default host = `localhost`
    `static long` | `DEFAULT_NETWORK_RECOVERY_INTERNAL` The default network recovery internal = `5000`
    `static String` | `DEFAULT_PASSWORD` The default password = `guest`
    `static int` | `DEFAULT_PORT` The default port = `- 1` - `5671` for SSL otherwise `5672`
    `static long` | `DEFAULT_RECONNECT_INTERVAL` The default connection retry delay = `10000`
    `static int` | `DEFAULT_REQUESTED_CHANNEL_MAX` The default requested channel max = `0`
    `static int` | `DEFAULT_REQUESTED_HEARTBEAT` The default connection timeout = `60`
    `static String` | `DEFAULT_USER` The default user = `guest`
    `static String` | `DEFAULT_VIRTUAL_HOST` The default virtual host = `/`

    - ### Fields inherited from class io.vertx.core.net.NetClientOptions

      `DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS`

    - ### Fields inherited from class io.vertx.core.net.ClientOptionsBase

      `DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL`

    - ### Fields inherited from class io.vertx.core.net.TCPSSLOptions

      `DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN`

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RabbitMQOptions()`
    `RabbitMQOptions(JsonObject json)`
    `RabbitMQOptions(RabbitMQOptions other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<com.rabbitmq.client.Address>` | `getAddresses()`
    `int` | `getConnectionTimeout()`
    `int` | `getHandshakeTimeout()`
    `String` | `getHost()`
    `boolean` | `getIncludeProperties()`
    `long` | `getNetworkRecoveryInterval()`
    `String` | `getPassword()`
    `int` | `getPort()`
    `int` | `getRequestedChannelMax()`
    `int` | `getRequestedHeartbeat()`
    `String` | `getUri()`
    `String` | `getUser()`
    `String` | `getVirtualHost()`
    `boolean` | `isAutomaticRecoveryEnabled()`
    `RabbitMQOptions` | `setAddresses(List<com.rabbitmq.client.Address> addresses)` Set multiple addresses for cluster mode.
    `RabbitMQOptions` | `setAutomaticRecoveryEnabled(boolean automaticRecoveryEnabled)` Enables or disables automatic connection recovery.
    `RabbitMQOptions` | `setConnectionTimeout(int connectionTimeout)` Set the TCP connection timeout, in milliseconds, `zero` for infinite).
    `RabbitMQOptions` | `setHandshakeTimeout(int handshakeTimeout)` Set the AMQP 0-9-1 protocol handshake timeout, in milliseconds
    `RabbitMQOptions` | `setHost(String host)` Set the default host to use for connections.
    `RabbitMQOptions` | `setIncludeProperties(boolean includeProperties)` Set wether to include properties when a broker message is passed on the event bus
    `RabbitMQOptions` | `setKeyCertOptions(KeyCertOptions options)` Set the key/cert options.
    `RabbitMQOptions` | `setKeyStoreOptions(JksOptions options)` Set the key/cert options in jks format, aka Java keystore.
    `RabbitMQOptions` | `setNetworkRecoveryInterval(long networkRecoveryInterval)` Set how long in milliseconds will automatic recovery wait before attempting to reconnect, default is `5000`
    `RabbitMQOptions` | `setPassword(String password)` Set the password to use when connecting to the broker.
    `RabbitMQOptions` | `setPemKeyCertOptions(PemKeyCertOptions options)` Set the key/cert store options in pem format.
    `RabbitMQOptions` | `setPemTrustOptions(PemTrustOptions options)` Set the trust options in pem format
    `RabbitMQOptions` | `setPfxKeyCertOptions(PfxOptions options)` Set the key/cert options in pfx format.
    `RabbitMQOptions` | `setPfxTrustOptions(PfxOptions options)` Set the trust options in pfx format
    `RabbitMQOptions` | `setPort(int port)` Set the default port to use for connections.
    `RabbitMQOptions` | `setReconnectAttempts(int attempts)` Set the value of reconnect attempts
    `RabbitMQOptions` | `setReconnectInterval(long interval)` Set the reconnect interval
    `RabbitMQOptions` | `setRequestedChannelMax(int requestedChannelMax)` Set the initially requested maximum channel number, `zero` for unlimited.
    `RabbitMQOptions` | `setRequestedHeartbeat(int requestedHeartbeat)` Set the initially requested heartbeat interval, in seconds, `zero` for none.
    `RabbitMQOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `RabbitMQOptions` | `setTrustAll(boolean trustAll)` Set whether all server certificates should be trusted
    `RabbitMQOptions` | `setTrustOptions(TrustOptions options)` Set the trust options.
    `RabbitMQOptions` | `setUri(String uri)`
    `RabbitMQOptions` | `setUser(String user)` Set the AMQP user name to use when connecting to the broker.
    `RabbitMQOptions` | `setVirtualHost(String virtualHost)` Set the virtual host to use when connecting to the broker.

    - ### Methods inherited from class io.vertx.core.net.NetClientOptions

      `addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, removeEnabledSecureTransportProtocol, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setLocalAddress, setLogActivity, setMetricsName, setOpenSslEngineOptions, setProxyOptions, setReceiveBufferSize, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustStoreOptions, setUseAlpn`

    - ### Methods inherited from class io.vertx.core.net.ClientOptionsBase

      `getConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAll, toJson`

    - ### Methods inherited from class io.vertx.core.net.TCPSSLOptions

      `getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn`

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      The default port = `- 1` - `5671` for SSL otherwise `5672`
      See Also:
        Constant Field Values

    - #### DEFAULT_HOST

          public static final String DEFAULT_HOST

      The default host = `localhost`
      See Also:
        Constant Field Values

    - #### DEFAULT_USER

          public static final String DEFAULT_USER

      The default user = `guest`
      See Also:
        Constant Field Values

    - #### DEFAULT_PASSWORD

          public static final String DEFAULT_PASSWORD

      The default password = `guest`
      See Also:
        Constant Field Values

    - #### DEFAULT_VIRTUAL_HOST

          public static final String DEFAULT_VIRTUAL_HOST

      The default virtual host = `/`
      See Also:
        Constant Field Values

    - #### DEFAULT_CONNECTION_TIMEOUT

          public static final int DEFAULT_CONNECTION_TIMEOUT

      The default connection timeout = `60000`
      See Also:
        Constant Field Values

    - #### DEFAULT_REQUESTED_HEARTBEAT

          public static final int DEFAULT_REQUESTED_HEARTBEAT

      The default connection timeout = `60`
      See Also:
        Constant Field Values

    - #### DEFAULT_HANDSHAKE_TIMEOUT

          public static final int DEFAULT_HANDSHAKE_TIMEOUT

      The default handshake timeout = `10000`
      See Also:
        Constant Field Values

    - #### DEFAULT_REQUESTED_CHANNEL_MAX

          public static final int DEFAULT_REQUESTED_CHANNEL_MAX

      The default requested channel max = `0`
      See Also:
        Constant Field Values

    - #### DEFAULT_NETWORK_RECOVERY_INTERNAL

          public static final long DEFAULT_NETWORK_RECOVERY_INTERNAL

      The default network recovery internal = `5000`
      See Also:
        Constant Field Values

    - #### DEFAULT_AUTOMATIC_RECOVERY_ENABLED

          public static final boolean DEFAULT_AUTOMATIC_RECOVERY_ENABLED

      The default automatic recovery enabled = `false`
      See Also:
        Constant Field Values

    - #### DEFAULT_RECONNECT_INTERVAL

          public static final long DEFAULT_RECONNECT_INTERVAL

      The default connection retry delay = `10000`
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RabbitMQOptions

          public RabbitMQOptions()

    - #### RabbitMQOptions

          public RabbitMQOptions(JsonObject json)

    - #### RabbitMQOptions

          public RabbitMQOptions(RabbitMQOptions other)

  - ### Method Detail

    - #### getAddresses

          public List<com.rabbitmq.client.Address> getAddresses()

    - #### setAddresses

          public RabbitMQOptions setAddresses(List<com.rabbitmq.client.Address> addresses)

      Set multiple addresses for cluster mode.
      Parameters:
        `addresses` - addresses of AMQP cluster
      Returns:
        a reference to this, so the API can be used fluently

    - #### getUri

          public String getUri()

    - #### setUri

          public RabbitMQOptions setUri(String uri)

    - #### getUser

          public String getUser()

      Returns:
        the AMQP user name to use when connecting to the broker

    - #### setUser

          public RabbitMQOptions setUser(String user)

      Set the AMQP user name to use when connecting to the broker.
      Parameters:
        `user` - the user name
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPassword

          public String getPassword()

      Returns:
        the password to use when connecting to the broker

    - #### setPassword

          public RabbitMQOptions setPassword(String password)

      Set the password to use when connecting to the broker.
      Parameters:
        `password` - the password
      Returns:
        a reference to this, so the API can be used fluently

    - #### getHost

          public String getHost()

      Returns:
        the default host to use for connections

    - #### setHost

          public RabbitMQOptions setHost(String host)

      Set the default host to use for connections.
      Parameters:
        `host` - the default host
      Returns:
        a reference to this, so the API can be used fluently

    - #### getVirtualHost

          public String getVirtualHost()

      Returns:
        the virtual host to use when connecting to the broker

    - #### setVirtualHost

          public RabbitMQOptions setVirtualHost(String virtualHost)

      Set the virtual host to use when connecting to the broker.
      Parameters:
        `virtualHost` - the virtual host
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPort

          public int getPort()

      Returns:
        the default port to use for connections

    - #### setPort

          public RabbitMQOptions setPort(int port)

      Set the default port to use for connections.
      Parameters:
        `port` - the default port
      Returns:
        a reference to this, so the API can be used fluently

    - #### getConnectionTimeout

          public int getConnectionTimeout()

      Returns:
        the TCP connection timeout

    - #### setConnectionTimeout

          public RabbitMQOptions setConnectionTimeout(int connectionTimeout)

      Set the TCP connection timeout, in milliseconds, `zero` for infinite).
      Parameters:
        `connectionTimeout` - the timeouut in milliseconds.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getRequestedHeartbeat

          public int getRequestedHeartbeat()

      Returns:
        the initially requested heartbeat interval

    - #### setRequestedHeartbeat

          public RabbitMQOptions setRequestedHeartbeat(int requestedHeartbeat)

      Set the initially requested heartbeat interval, in seconds, `zero` for none.
      Parameters:
        `requestedHeartbeat` - the request heartbeat interval
      Returns:
        a reference to this, so the API can be used fluently

    - #### getHandshakeTimeout

          public int getHandshakeTimeout()

      Returns:
        the AMQP 0-9-1 protocol handshake timeout

    - #### setHandshakeTimeout

          public RabbitMQOptions setHandshakeTimeout(int handshakeTimeout)

      Set the AMQP 0-9-1 protocol handshake timeout, in milliseconds
      Parameters:
        `handshakeTimeout` - the timeout in milliseconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### getRequestedChannelMax

          public int getRequestedChannelMax()

      Returns:
        the initially requested maximum channel number

    - #### setRequestedChannelMax

          public RabbitMQOptions setRequestedChannelMax(int requestedChannelMax)

      Set the initially requested maximum channel number, `zero` for unlimited.
      Parameters:
        `requestedChannelMax` - the requested maximum channel number
      Returns:
        a reference to this, so the API can be used fluently

    - #### getNetworkRecoveryInterval

          public long getNetworkRecoveryInterval()

      Returns:
        automatic connection recovery interval

    - #### setNetworkRecoveryInterval

          public RabbitMQOptions setNetworkRecoveryInterval(long networkRecoveryInterval)

      Set how long in milliseconds will automatic recovery wait before attempting to reconnect, default is `5000`
      Parameters:
        `networkRecoveryInterval` - the connection recovery interval
      Returns:
        a reference to this, so the API can be used fluently

    - #### isAutomaticRecoveryEnabled

          public boolean isAutomaticRecoveryEnabled()

      Returns:
        `true` if automatic connection recovery is enabled, `false` otherwise

    - #### setAutomaticRecoveryEnabled

          public RabbitMQOptions setAutomaticRecoveryEnabled(boolean automaticRecoveryEnabled)

      Enables or disables automatic connection recovery.
      Parameters:
        `automaticRecoveryEnabled` - if `true`, enables connection recovery
      Returns:
        a reference to this, so the API can be used fluently

    - #### getIncludeProperties

          public boolean getIncludeProperties()

      Returns:
        wether to include properties when a broker message is passed on the event bus

    - #### setIncludeProperties

          public RabbitMQOptions setIncludeProperties(boolean includeProperties)

      Set wether to include properties when a broker message is passed on the event bus
      Parameters:
        `includeProperties` - wether to include properties
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReconnectAttempts

          public RabbitMQOptions setReconnectAttempts(int attempts)

      Description copied from class: `NetClientOptions`
      Set the value of reconnect attempts
      Overrides:
        `setReconnectAttempts` in class `NetClientOptions`
      Parameters:
        `attempts` - the maximum number of reconnect attempts
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReconnectInterval

          public RabbitMQOptions setReconnectInterval(long interval)

      Description copied from class: `NetClientOptions`
      Set the reconnect interval
      Overrides:
        `setReconnectInterval` in class `NetClientOptions`
      Parameters:
        `interval` - the reconnect interval in ms
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSsl

          public RabbitMQOptions setSsl(boolean ssl)

      Description copied from class: `TCPSSLOptions`
      Set whether SSL/TLS is enabled
      Overrides:
        `setSsl` in class `NetClientOptions`
      Parameters:
        `ssl` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustAll

          public RabbitMQOptions setTrustAll(boolean trustAll)

      Description copied from class: `ClientOptionsBase`
      Set whether all server certificates should be trusted
      Overrides:
        `setTrustAll` in class `NetClientOptions`
      Parameters:
        `trustAll` - true if all should be trusted
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyCertOptions

          public RabbitMQOptions setKeyCertOptions(KeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options.
      Overrides:
        `setKeyCertOptions` in class `NetClientOptions`
      Parameters:
        `options` - the key store options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyStoreOptions

          public RabbitMQOptions setKeyStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in jks format, aka Java keystore.
      Overrides:
        `setKeyStoreOptions` in class `NetClientOptions`
      Parameters:
        `options` - the key store in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxKeyCertOptions

          public RabbitMQOptions setPfxKeyCertOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in pfx format.
      Overrides:
        `setPfxKeyCertOptions` in class `NetClientOptions`
      Parameters:
        `options` - the key cert options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemKeyCertOptions

          public RabbitMQOptions setPemKeyCertOptions(PemKeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert store options in pem format.
      Overrides:
        `setPemKeyCertOptions` in class `NetClientOptions`
      Parameters:
        `options` - the options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustOptions

          public RabbitMQOptions setTrustOptions(TrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options.
      Overrides:
        `setTrustOptions` in class `NetClientOptions`
      Parameters:
        `options` - the trust options
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemTrustOptions

          public RabbitMQOptions setPemTrustOptions(PemTrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pem format
      Overrides:
        `setPemTrustOptions` in class `NetClientOptions`
      Parameters:
        `options` - the trust options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxTrustOptions

          public RabbitMQOptions setPfxTrustOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pfx format
      Overrides:
        `setPfxTrustOptions` in class `NetClientOptions`
      Parameters:
        `options` - the trust options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2021 Eclipse. All rights reserved.