Class RMQConnectionConfig
- java.lang.Object
-
- org.apache.flink.streaming.connectors.rabbitmq.common.RMQConnectionConfig
-
- All Implemented Interfaces:
Serializable
public class RMQConnectionConfig extends Object implements Serializable
Connection Configuration for RMQ. IfRMQConnectionConfig.Builder.setUri(String)has been set thenRMQConnectionConfig(String, Integer, Boolean, Boolean, Integer, Integer, Integer, Integer, Integer, Long)will be used for initialize the RMQ connection orRMQConnectionConfig(String, Integer, String, String, String, Integer, Boolean, Boolean, Integer, Integer, Integer, Integer, Integer, Long)will be used for initialize the RMQ connection- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRMQConnectionConfig.BuilderThe Builder Class forRMQConnectionConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.rabbitmq.client.ConnectionFactorygetConnectionFactory()IntegergetConnectionTimeout()Retrieve the connection timeout.longgetDeliveryTimeout()Retrieve the message delivery timeout used in the queueing consumer.StringgetHost()IntegergetNetworkRecoveryInterval()Returns automatic connection recovery interval in milliseconds.StringgetPassword()Retrieve the password.intgetPort()Optional<Integer>getPrefetchCount()Retrieve the channel prefetch count.IntegergetRequestedChannelMax()Retrieve the requested maximum channel number.IntegergetRequestedFrameMax()Retrieve the requested maximum frame size.IntegergetRequestedHeartbeat()Retrieve the requested heartbeat interval.StringgetUri()Retrieve the URI.StringgetUsername()Retrieve the user name.StringgetVirtualHost()Retrieve the virtual host.BooleanisAutomaticRecovery()Returns true if automatic connection recovery is enabled, false otherwise.BooleanisTopologyRecovery()Returns true if topology recovery is enabled, false otherwise.
-
-
-
Method Detail
-
getHost
public String getHost()
- Returns:
- the host to use for connections
-
getPort
public int getPort()
- Returns:
- the port to use for connections
-
getVirtualHost
public String getVirtualHost()
Retrieve the virtual host.- Returns:
- the virtual host to use when connecting to the broker
-
getUsername
public String getUsername()
Retrieve the user name.- Returns:
- the AMQP user name to use when connecting to the broker
-
getPassword
public String getPassword()
Retrieve the password.- Returns:
- the password to use when connecting to the broker
-
getUri
public String getUri()
Retrieve the URI.- Returns:
- the connection URI when connecting to the broker
-
getNetworkRecoveryInterval
public Integer getNetworkRecoveryInterval()
Returns automatic connection recovery interval in milliseconds.- Returns:
- how long will automatic recovery wait before attempting to reconnect, in ms; default is 5000
-
isAutomaticRecovery
public Boolean isAutomaticRecovery()
Returns true if automatic connection recovery is enabled, false otherwise.- Returns:
- true if automatic connection recovery is enabled, false otherwise
-
isTopologyRecovery
public Boolean isTopologyRecovery()
Returns true if topology recovery is enabled, false otherwise.- Returns:
- true if topology recovery is enabled, false otherwise
-
getConnectionTimeout
public Integer getConnectionTimeout()
Retrieve the connection timeout.- Returns:
- the connection timeout, in milliseconds; zero for infinite
-
getRequestedChannelMax
public Integer getRequestedChannelMax()
Retrieve the requested maximum channel number.- Returns:
- the initially requested maximum channel number; zero for unlimited
-
getRequestedFrameMax
public Integer getRequestedFrameMax()
Retrieve the requested maximum frame size.- Returns:
- the initially requested maximum frame size, in octets; zero for unlimited
-
getRequestedHeartbeat
public Integer getRequestedHeartbeat()
Retrieve the requested heartbeat interval.- Returns:
- the initially requested heartbeat interval, in seconds; zero for none
-
getPrefetchCount
public Optional<Integer> getPrefetchCount()
Retrieve the channel prefetch count.- Returns:
- an Optional of the prefetch count, if set, for the consumer channel
-
getDeliveryTimeout
public long getDeliveryTimeout()
Retrieve the message delivery timeout used in the queueing consumer. If not specified explicitly, the default value of 30000 milliseconds will be returned.- Returns:
- the message delivery timeout, in milliseconds
-
getConnectionFactory
public com.rabbitmq.client.ConnectionFactory getConnectionFactory() throws URISyntaxException, NoSuchAlgorithmException, KeyManagementException- Returns:
- Connection Factory for RMQ
- Throws:
URISyntaxException- if Malformed URI has been passedNoSuchAlgorithmException- if the ssl factory could not be createdKeyManagementException- if the ssl context could not be initialized
-
-