public static class RMQConnectionConfig.Builder extends Object
RMQConnectionConfig
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RMQConnectionConfig |
build()
The Builder method.
|
RMQConnectionConfig.Builder |
setAutomaticRecovery(boolean automaticRecovery)
Enables or disables automatic connection recovery.
|
RMQConnectionConfig.Builder |
setConnectionTimeout(int connectionTimeout)
Set the connection timeout.
|
RMQConnectionConfig.Builder |
setDeliveryTimeout(long deliveryTimeout)
Enables setting the message delivery timeout in the queueing consumer.
|
RMQConnectionConfig.Builder |
setDeliveryTimeout(long deliveryTimeout,
TimeUnit unit)
Enables setting the message delivery timeout in the queueing consumer.
|
RMQConnectionConfig.Builder |
setHost(String host) |
RMQConnectionConfig.Builder |
setNetworkRecoveryInterval(int networkRecoveryInterval)
Sets connection recovery interval.
|
RMQConnectionConfig.Builder |
setPassword(String password)
Set the password.
|
RMQConnectionConfig.Builder |
setPort(int port)
Set the target port.
|
RMQConnectionConfig.Builder |
setPrefetchCount(int prefetchCount)
Enables setting basicQos for the consumer channel.
|
RMQConnectionConfig.Builder |
setRequestedChannelMax(int requestedChannelMax)
Set the requested maximum channel number.
|
RMQConnectionConfig.Builder |
setRequestedFrameMax(int requestedFrameMax)
Set the requested maximum frame size.
|
RMQConnectionConfig.Builder |
setRequestedHeartbeat(int requestedHeartbeat)
Set the requested heartbeat.
|
RMQConnectionConfig.Builder |
setTopologyRecoveryEnabled(boolean topologyRecovery)
Enables or disables topology recovery.
|
RMQConnectionConfig.Builder |
setUri(String uri)
Convenience method for setting the fields in an AMQP URI: host, port, username, password
and virtual host.
|
RMQConnectionConfig.Builder |
setUserName(String username)
Set the user name.
|
RMQConnectionConfig.Builder |
setVirtualHost(String virtualHost)
Set the virtual host.
|
public RMQConnectionConfig.Builder setPort(int port)
port
- the default port to use for connectionspublic RMQConnectionConfig.Builder setHost(String host)
host
- the default host to use for connectionspublic RMQConnectionConfig.Builder setVirtualHost(String virtualHost)
virtualHost
- the virtual host to use when connecting to the brokerpublic RMQConnectionConfig.Builder setUserName(String username)
username
- the AMQP user name to use when connecting to the brokerpublic RMQConnectionConfig.Builder setPassword(String password)
password
- the password to use when connecting to the brokerpublic RMQConnectionConfig.Builder setUri(String uri)
uri
- is the AMQP URI containing the datapublic RMQConnectionConfig.Builder setTopologyRecoveryEnabled(boolean topologyRecovery)
topologyRecovery
- if true, enables topology recoverypublic RMQConnectionConfig.Builder setRequestedHeartbeat(int requestedHeartbeat)
requestedHeartbeat
- the initially requested heartbeat interval, in seconds; zero
for nonepublic RMQConnectionConfig.Builder setRequestedFrameMax(int requestedFrameMax)
requestedFrameMax
- initially requested maximum frame size, in octets; zero for
unlimitedpublic RMQConnectionConfig.Builder setRequestedChannelMax(int requestedChannelMax)
requestedChannelMax
- initially requested maximum channel number; zero for unlimitedpublic RMQConnectionConfig.Builder setNetworkRecoveryInterval(int networkRecoveryInterval)
networkRecoveryInterval
- how long will automatic recovery wait before attempting to
reconnect, in mspublic RMQConnectionConfig.Builder setConnectionTimeout(int connectionTimeout)
connectionTimeout
- connection establishment timeout in milliseconds; zero for
infinitepublic RMQConnectionConfig.Builder setAutomaticRecovery(boolean automaticRecovery)
automaticRecovery
- if true, enables connection recoverypublic RMQConnectionConfig.Builder setPrefetchCount(int prefetchCount)
RMQSource
. Set to 0 for unlimited, which is the default.prefetchCount
- the max number of messages to receive without acknowledgement.public RMQConnectionConfig.Builder setDeliveryTimeout(long deliveryTimeout)
RMQSource
. If not set it will default to 30000.deliveryTimeout
- maximum wait time, in milliseconds, for the next message deliverypublic RMQConnectionConfig.Builder setDeliveryTimeout(long deliveryTimeout, TimeUnit unit)
RMQSource
. If not set it will default to 30 seconds.deliveryTimeout
- maximum wait time for the next message deliveryunit
- deliveryTimeout unitpublic RMQConnectionConfig build()
If URI is NULL we use host, port, vHost, username, password combination to initialize
connection. using RMQConnectionConfig(String, Integer, String,
String, String, Integer, Boolean, Boolean, Integer, Integer, Integer, Integer, Integer,
Long)
.
Otherwise the URI will be used to initialize the client connection RMQConnectionConfig(String, Integer, Boolean, Boolean, Integer,
Integer, Integer, Integer, Integer, Long)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.