public class RabbitMQOptions extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_AUTOMATIC_RECOVERY_ENABLED
The default automatic recovery enabled =
false |
static String |
DEFAULT_CONNECTION_NAME
The default connection name =
VertxRabbitMQ |
static Integer |
DEFAULT_CONNECTION_RETRIES
The default connection retries =
null (no retry) |
static long |
DEFAULT_CONNECTION_RETRY_DELAY
The default connection retry delay =
10000 |
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 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 =
/ |
Constructor and Description |
---|
RabbitMQOptions() |
RabbitMQOptions(JsonObject json) |
RabbitMQOptions(RabbitMQOptions that) |
Modifier and Type | Method and Description |
---|---|
List<com.rabbitmq.client.Address> |
getAddresses() |
String |
getConnectionName() |
Integer |
getConnectionRetries() |
long |
getConnectionRetryDelay() |
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 |
setConnectionName(String connectionName) |
RabbitMQOptions |
setConnectionRetries(Integer connectionRetries)
Set the number of connection retries to attempt when connecting, the
null value disables it. |
RabbitMQOptions |
setConnectionRetryDelay(long connectionRetryDelay)
Set the delay in milliseconds between connection retries.
|
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 |
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 |
setPort(int port)
Set the default port to use for connections.
|
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 |
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.
|
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 long DEFAULT_CONNECTION_RETRY_DELAY
10000
public static final Integer DEFAULT_CONNECTION_RETRIES
null
(no retry)public static final String DEFAULT_CONNECTION_NAME
VertxRabbitMQ
public RabbitMQOptions()
public RabbitMQOptions(JsonObject json)
public RabbitMQOptions(RabbitMQOptions that)
public Integer getConnectionRetries()
public RabbitMQOptions setConnectionRetries(Integer connectionRetries)
null
value disables it.connectionRetries
- the number of retriespublic long getConnectionRetryDelay()
public RabbitMQOptions setConnectionRetryDelay(long connectionRetryDelay)
connectionRetryDelay
- the delay in millisecondspublic 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 getIncludeProperties()
public RabbitMQOptions setIncludeProperties(boolean includeProperties)
includeProperties
- wether to include propertiespublic String getConnectionName()
public RabbitMQOptions setConnectionName(String connectionName)
Copyright © 2023 Eclipse. All rights reserved.