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 String |
DEFAULT_CONNECTION_NAME
The default connection name =
VertxRabbitMQ |
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_REGISTER_WRITE_HANDLER
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, 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_KEEAPLIVE_INTERVAL_SECONDS, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_KEEPALIVE_COUNT, DEFAULT_TCP_KEEPALIVE_IDLE_SECONDS, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUT
DEFAULT_LOG_ACTIVITY_FORMAT, 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() |
String |
getConnectionName() |
int |
getConnectionTimeout() |
com.rabbitmq.client.impl.CredentialsProvider |
getCredentialsProvider() |
com.rabbitmq.client.impl.CredentialsRefreshService |
getCredentialsRefreshService() |
int |
getHandshakeTimeout() |
String |
getHost() |
boolean |
getIncludeProperties() |
com.rabbitmq.client.MetricsCollector |
getMetricsCollector() |
long |
getNetworkRecoveryInterval() |
String |
getPassword() |
int |
getPort() |
int |
getRequestedChannelMax() |
int |
getRequestedHeartbeat() |
com.rabbitmq.client.DefaultSaslConfig |
getSaslConfig() |
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 |
setConnectionName(String connectionName) |
RabbitMQOptions |
setConnectionTimeout(int connectionTimeout)
Set the TCP connection timeout, in milliseconds,
zero for infinite). |
RabbitMQOptions |
setCredentialsProvider(com.rabbitmq.client.impl.CredentialsProvider credentialsProvider)
Provides a RabbitMQ credentials provider for using dynamic credentials.
|
RabbitMQOptions |
setCredentialsRefreshService(com.rabbitmq.client.impl.CredentialsRefreshService credentialsRefreshService)
Provides a RabbitMQ credentials refresh service for refreshing dynamic credentials.
|
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 |
setHostnameVerificationAlgorithm(String algorithm)
Set the hostname verification algorithm interval
To disable hostname verification, set hostnameVerificationAlgorithm to an empty String
|
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 |
setMetricsCollector(com.rabbitmq.client.MetricsCollector metricsCollector)
Provides a metrics collector for RabbitMQ.
|
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 |
setSaslConfig(com.rabbitmq.client.DefaultSaslConfig saslConfig)
Set the SASL mechanism for rabbitmq authentication
|
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.
|
JsonObject |
toJson()
Convert to JSON
|
addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, isRegisterWriteHandler, removeEnabledCipherSuite, removeEnabledSecureTransportProtocol, setActivityLogDataFormat, setApplicationLayerProtocols, setConnectTimeout, setEnabledSecureTransportProtocols, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setLocalAddress, setLogActivity, setMetricsName, setNonProxyHosts, setOpenSslEngineOptions, setProxyOptions, setReadIdleTimeout, setReceiveBufferSize, setRegisterWriteHandler, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustStoreOptions, setUseAlpn, setWriteIdleTimeout
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll, setTcpUserTimeout
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpKeepAliveCount, getTcpKeepAliveIdleSeconds, getTcpKeepAliveIntervalSeconds, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpKeepAliveCount, setTcpKeepAliveIdleSeconds, setTcpKeepAliveIntervalSeconds
getActivityLogDataFormat, 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 static final String DEFAULT_CONNECTION_NAME
VertxRabbitMQ
public RabbitMQOptions()
public RabbitMQOptions(JsonObject json)
public RabbitMQOptions(RabbitMQOptions other)
public JsonObject toJson()
ClientOptionsBase
toJson
in class NetClientOptions
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 com.rabbitmq.client.impl.CredentialsProvider getCredentialsProvider()
public RabbitMQOptions setCredentialsProvider(com.rabbitmq.client.impl.CredentialsProvider credentialsProvider)
public com.rabbitmq.client.impl.CredentialsRefreshService getCredentialsRefreshService()
public RabbitMQOptions setCredentialsRefreshService(com.rabbitmq.client.impl.CredentialsRefreshService credentialsRefreshService)
public com.rabbitmq.client.DefaultSaslConfig getSaslConfig()
public RabbitMQOptions setSaslConfig(com.rabbitmq.client.DefaultSaslConfig saslConfig)
saslConfig
- Thepublic com.rabbitmq.client.MetricsCollector getMetricsCollector()
public RabbitMQOptions setMetricsCollector(com.rabbitmq.client.MetricsCollector metricsCollector)
public 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 formatpublic RabbitMQOptions setHostnameVerificationAlgorithm(String algorithm)
NetClientOptions
setHostnameVerificationAlgorithm
in class NetClientOptions
algorithm
- should be HTTPS, LDAPS or an empty Stringpublic String getConnectionName()
public RabbitMQOptions setConnectionName(String connectionName)
Copyright © 2024 Eclipse. All rights reserved.