public class RabbitMQOptions extends NetClientOptions
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_AUTOMATIC_RECOVERY_ENABLED
The default automatic recovery enabled =
false |
static boolean |
DEFAULT_AUTOMATIC_RECOVERY_ON_INITIAL_CONNECTION
The default automatic recovery on initial connection =
true |
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 boolean |
DEFAULT_USE_NIO_SOCKETS
The default use nio sockets =
false |
static String |
DEFAULT_USER
The default user =
guest |
static String |
DEFAULT_VIRTUAL_HOST
The default virtual host =
/ |
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
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
DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS
Constructor and Description |
---|
RabbitMQOptions() |
RabbitMQOptions(JsonObject json) |
RabbitMQOptions(RabbitMQOptions other) |
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() |
boolean |
isAutomaticRecoveryOnInitialConnection() |
boolean |
isNioEnabled() |
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 |
setAutomaticRecoveryOnInitialConnection(boolean automaticRecoveryOnInitialConnection)
Enable or disable automatic recovery on initial connections.
|
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 |
setUseNio(boolean useNio)
Enables or disables usage of NIO Sockets.
|
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.
|
addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, removeEnabledSecureTransportProtocol, setApplicationLayerProtocols, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setLocalAddress, setLogActivity, setMetricsName, setNonProxyHosts, setOpenSslEngineOptions, setProxyOptions, setReceiveBufferSize, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustStoreOptions, setUseAlpn
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll, toJson
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
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public static final int DEFAULT_PORT
- 1
- 5671
for SSL otherwise 5672
public static final String DEFAULT_HOST
localhost
public static final String DEFAULT_USER
guest
public static final String DEFAULT_PASSWORD
guest
public static final String DEFAULT_VIRTUAL_HOST
/
public static final int DEFAULT_CONNECTION_TIMEOUT
60000
public static final int DEFAULT_REQUESTED_HEARTBEAT
60
public static final int DEFAULT_HANDSHAKE_TIMEOUT
10000
public static final int DEFAULT_REQUESTED_CHANNEL_MAX
0
public static final long DEFAULT_NETWORK_RECOVERY_INTERNAL
5000
public static final boolean DEFAULT_AUTOMATIC_RECOVERY_ENABLED
false
public static final boolean DEFAULT_AUTOMATIC_RECOVERY_ON_INITIAL_CONNECTION
true
public static final long DEFAULT_RECONNECT_INTERVAL
10000
public static final boolean DEFAULT_USE_NIO_SOCKETS
false
public RabbitMQOptions()
public RabbitMQOptions(JsonObject json)
public RabbitMQOptions(RabbitMQOptions other)
public List<com.rabbitmq.client.Address> getAddresses()
public RabbitMQOptions setAddresses(List<com.rabbitmq.client.Address> addresses)
addresses
- addresses of AMQP clusterpublic String getUri()
public RabbitMQOptions setUri(String uri)
public String getUser()
public RabbitMQOptions setUser(String user)
user
- the user namepublic String getPassword()
public RabbitMQOptions setPassword(String password)
password
- the passwordpublic String getHost()
public RabbitMQOptions setHost(String host)
host
- the default hostpublic String getVirtualHost()
public RabbitMQOptions setVirtualHost(String virtualHost)
virtualHost
- the virtual hostpublic int getPort()
public RabbitMQOptions setPort(int port)
port
- the default portpublic int getConnectionTimeout()
public RabbitMQOptions setConnectionTimeout(int connectionTimeout)
zero
for infinite).connectionTimeout
- the timeouut in milliseconds.public int getRequestedHeartbeat()
public RabbitMQOptions setRequestedHeartbeat(int requestedHeartbeat)
zero
for none.requestedHeartbeat
- the request heartbeat intervalpublic int getHandshakeTimeout()
public RabbitMQOptions setHandshakeTimeout(int handshakeTimeout)
handshakeTimeout
- the timeout in millisecondspublic int getRequestedChannelMax()
public RabbitMQOptions setRequestedChannelMax(int requestedChannelMax)
zero
for unlimited.requestedChannelMax
- the requested maximum channel numberpublic long getNetworkRecoveryInterval()
public RabbitMQOptions setNetworkRecoveryInterval(long networkRecoveryInterval)
5000
networkRecoveryInterval
- the connection recovery intervalpublic boolean isAutomaticRecoveryEnabled()
true
if automatic connection recovery is enabled, false
otherwisepublic RabbitMQOptions setAutomaticRecoveryEnabled(boolean automaticRecoveryEnabled)
automaticRecoveryEnabled
- if true
, enables connection recoverypublic boolean isAutomaticRecoveryOnInitialConnection()
public RabbitMQOptions setAutomaticRecoveryOnInitialConnection(boolean automaticRecoveryOnInitialConnection)
automaticRecoveryOnInitialConnection
- if false
, prevents automatic recovery on the first connection attempts.public boolean getIncludeProperties()
public RabbitMQOptions setIncludeProperties(boolean includeProperties)
includeProperties
- wether to include propertiespublic boolean isNioEnabled()
true
if NIO Sockets are enabled, false
otherwisepublic RabbitMQOptions setUseNio(boolean useNio)
useNio
- if true
, enables NIO Socketspublic RabbitMQOptions setReconnectAttempts(int attempts)
NetClientOptions
setReconnectAttempts
in class NetClientOptions
attempts
- the maximum number of reconnect attemptspublic RabbitMQOptions setReconnectInterval(long interval)
NetClientOptions
setReconnectInterval
in class NetClientOptions
interval
- the reconnect interval in mspublic RabbitMQOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class NetClientOptions
ssl
- true if enabledpublic RabbitMQOptions setTrustAll(boolean trustAll)
ClientOptionsBase
setTrustAll
in class NetClientOptions
trustAll
- true if all should be trustedpublic RabbitMQOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptions
setKeyCertOptions
in class NetClientOptions
options
- the key store optionspublic RabbitMQOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptions
setKeyStoreOptions
in class NetClientOptions
options
- the key store in jks formatpublic RabbitMQOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptions
setPfxKeyCertOptions
in class NetClientOptions
options
- the key cert options in pfx formatpublic RabbitMQOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptions
setPemKeyCertOptions
in class NetClientOptions
options
- the options in pem formatpublic RabbitMQOptions setTrustOptions(TrustOptions options)
TCPSSLOptions
setTrustOptions
in class NetClientOptions
options
- the trust optionspublic RabbitMQOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptions
setPemTrustOptions
in class NetClientOptions
options
- the trust options in pem formatpublic RabbitMQOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptions
setPfxTrustOptions
in class NetClientOptions
options
- the trust options in pfx formatCopyright © 2021 Eclipse. All rights reserved.