Class RabbitMQConnectorCommonConfiguration
java.lang.Object
io.smallrye.reactive.messaging.rabbitmq.RabbitMQConnectorCommonConfiguration
- Direct Known Subclasses:
RabbitMQConnectorIncomingConfiguration
,RabbitMQConnectorOutgoingConfiguration
Extracts the common configuration for the
smallrye-rabbitmq
connector.-
Field Summary
-
Constructor Summary
ConstructorDescriptionRabbitMQConnectorCommonConfiguration
(org.eclipse.microprofile.config.Config config) Creates a new RabbitMQConnectorCommonConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.microprofile.config.Config
config()
Gets the addresses value from the configuration.Gets the automatic-recovery-enabled value from the configuration.Gets the automatic-recovery-on-initial-connection value from the configuration.Gets the client-options-name value from the configuration.Gets the connection-timeout value from the configuration.Gets the credentials-provider-name value from the configuration.Gets the exchange.arguments value from the configuration.Gets the exchange.auto-delete value from the configuration.Gets the exchange.declare value from the configuration.Gets the exchange.durable value from the configuration.Gets the exchange.name value from the configuration.Gets the exchange.type value from the configuration.protected <T> Optional<T>
getFromAlias
(String alias, Class<T> type) Retrieves the value stored for the given alias.protected <T> T
getFromAliasWithDefaultValue
(String alias, Class<T> type, T defaultValue) Retrieves the value stored for the given alias.Gets the handshake-timeout value from the configuration.Gets the health-enabled value from the configuration.Gets the health-readiness-enabled value from the configuration.getHost()
Gets the host value from the configuration.Gets the include-properties value from the configuration.Gets the network-recovery-interval value from the configuration.Gets the password value from the configuration.getPort()
Gets the port value from the configuration.Gets the reconnect-attempts value from the configuration.Gets the reconnect-interval value from the configuration.Gets the requested-channel-max value from the configuration.Gets the requested-heartbeat value from the configuration.getSsl()
Gets the ssl value from the configuration.Gets the ssl.hostname-verification-algorithm value from the configuration.Gets the tracing.attribute-headers value from the configuration.Gets the tracing.enabled value from the configuration.Gets the trust-all value from the configuration.Gets the trust-store-password value from the configuration.Gets the trust-store-path value from the configuration.Gets the use-nio value from the configuration.getUser()
Gets the user value from the configuration.Gets the username value from the configuration.Gets the virtual-host value from the configuration.void
validate()
-
Field Details
-
config
protected final org.eclipse.microprofile.config.Config config
-
-
Constructor Details
-
RabbitMQConnectorCommonConfiguration
public RabbitMQConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config) Creates a new RabbitMQConnectorCommonConfiguration.
-
-
Method Details
-
config
public org.eclipse.microprofile.config.Config config()- Returns:
- the connector configuration
-
getFromAlias
Retrieves the value stored for the given alias.- Type Parameters:
T
- the targeted type- Parameters:
alias
- the attribute alias, must not benull
or blanktype
- the targeted type- Returns:
- the configuration value for the given alias, empty if not set
-
getFromAliasWithDefaultValue
Retrieves the value stored for the given alias. Returns the default value if not present.- Type Parameters:
T
- the targeted type- Parameters:
alias
- the attribute alias, must not benull
or blanktype
- the targeted typedefaultValue
- the default value- Returns:
- the configuration value for the given alias, empty if not set
-
getChannel
- Returns:
- the channel name
-
getUsername
Gets the username value from the configuration. Attribute Name: username Description: The username used to authenticate to the broker MicroProfile Config Alias: rabbitmq-username- Returns:
- the username
-
getPassword
Gets the password value from the configuration. Attribute Name: password Description: The password used to authenticate to the broker MicroProfile Config Alias: rabbitmq-password- Returns:
- the password
-
getHost
Gets the host value from the configuration. Attribute Name: host Description: The broker hostname MicroProfile Config Alias: rabbitmq-host Default Value: localhost- Returns:
- the host
-
getPort
Gets the port value from the configuration. Attribute Name: port Description: The broker port MicroProfile Config Alias: rabbitmq-port Default Value: 5672- Returns:
- the port
-
getAddresses
Gets the addresses value from the configuration. Attribute Name: addresses Description: The multiple addresses for cluster mode, when given overrides the host and port MicroProfile Config Alias: rabbitmq-addresses- Returns:
- the addresses
-
getSsl
Gets the ssl value from the configuration. Attribute Name: ssl Description: Whether or not the connection should use SSL MicroProfile Config Alias: rabbitmq-ssl Default Value: false- Returns:
- the ssl
-
getSslHostnameVerificationAlgorithm
Gets the ssl.hostname-verification-algorithm value from the configuration. Attribute Name: ssl.hostname-verification-algorithm Description: Set the hostname verifier algorithm for the TLS connection. Accepted values are `HTTPS`, and `NONE` (defaults). `NONE` disables the hostname verification. Default Value: NONE- Returns:
- the ssl.hostname-verification-algorithm
-
getTrustAll
Gets the trust-all value from the configuration. Attribute Name: trust-all Description: Whether to skip trust certificate verification MicroProfile Config Alias: rabbitmq-trust-all Default Value: false- Returns:
- the trust-all
-
getTrustStorePath
Gets the trust-store-path value from the configuration. Attribute Name: trust-store-path Description: The path to a JKS trust store MicroProfile Config Alias: rabbitmq-trust-store-path- Returns:
- the trust-store-path
-
getTrustStorePassword
Gets the trust-store-password value from the configuration. Attribute Name: trust-store-password Description: The password of the JKS trust store MicroProfile Config Alias: rabbitmq-trust-store-password- Returns:
- the trust-store-password
-
getConnectionTimeout
Gets the connection-timeout value from the configuration. Attribute Name: connection-timeout Description: The TCP connection timeout (ms); 0 is interpreted as no timeout Default Value: 60000- Returns:
- the connection-timeout
-
getHandshakeTimeout
Gets the handshake-timeout value from the configuration. Attribute Name: handshake-timeout Description: The AMQP 0-9-1 protocol handshake timeout (ms) Default Value: 10000- Returns:
- the handshake-timeout
-
getAutomaticRecoveryEnabled
Gets the automatic-recovery-enabled value from the configuration. Attribute Name: automatic-recovery-enabled Description: Whether automatic connection recovery is enabled Default Value: false- Returns:
- the automatic-recovery-enabled
-
getAutomaticRecoveryOnInitialConnection
Gets the automatic-recovery-on-initial-connection value from the configuration. Attribute Name: automatic-recovery-on-initial-connection Description: Whether automatic recovery on initial connections is enabled Default Value: true- Returns:
- the automatic-recovery-on-initial-connection
-
getReconnectAttempts
Gets the reconnect-attempts value from the configuration. Attribute Name: reconnect-attempts Description: The number of reconnection attempts MicroProfile Config Alias: rabbitmq-reconnect-attempts Default Value: 100- Returns:
- the reconnect-attempts
-
getReconnectInterval
Gets the reconnect-interval value from the configuration. Attribute Name: reconnect-interval Description: The interval (in seconds) between two reconnection attempts MicroProfile Config Alias: rabbitmq-reconnect-interval Default Value: 10- Returns:
- the reconnect-interval
-
getNetworkRecoveryInterval
Gets the network-recovery-interval value from the configuration. Attribute Name: network-recovery-interval Description: How long (ms) will automatic recovery wait before attempting to reconnect Default Value: 5000- Returns:
- the network-recovery-interval
-
getUser
Gets the user value from the configuration. Attribute Name: user Description: The user name to use when connecting to the broker Default Value: guest- Returns:
- the user
-
getIncludeProperties
Gets the include-properties value from the configuration. Attribute Name: include-properties Description: Whether to include properties when a broker message is passed on the event bus Default Value: false- Returns:
- the include-properties
-
getRequestedChannelMax
Gets the requested-channel-max value from the configuration. Attribute Name: requested-channel-max Description: The initially requested maximum channel number Default Value: 2047- Returns:
- the requested-channel-max
-
getRequestedHeartbeat
Gets the requested-heartbeat value from the configuration. Attribute Name: requested-heartbeat Description: The initially requested heartbeat interval (seconds), zero for none Default Value: 60- Returns:
- the requested-heartbeat
-
getUseNio
Gets the use-nio value from the configuration. Attribute Name: use-nio Description: Whether usage of NIO Sockets is enabled Default Value: false- Returns:
- the use-nio
-
getVirtualHost
Gets the virtual-host value from the configuration. Attribute Name: virtual-host Description: The virtual host to use when connecting to the broker MicroProfile Config Alias: rabbitmq-virtual-host Default Value: /- Returns:
- the virtual-host
-
getClientOptionsName
Gets the client-options-name value from the configuration. Attribute Name: client-options-name Description: The name of the RabbitMQ Client Option bean used to customize the RabbitMQ client configuration MicroProfile Config Alias: rabbitmq-client-options-name- Returns:
- the client-options-name
-
getCredentialsProviderName
Gets the credentials-provider-name value from the configuration. Attribute Name: credentials-provider-name Description: The name of the RabbitMQ Credentials Provider bean used to provide dynamic credentials to the RabbitMQ client MicroProfile Config Alias: rabbitmq-credentials-provider-name- Returns:
- the credentials-provider-name
-
getHealthEnabled
Gets the health-enabled value from the configuration. Attribute Name: health-enabled Description: Whether health reporting is enabled (default) or disabled Default Value: true- Returns:
- the health-enabled
-
getHealthReadinessEnabled
Gets the health-readiness-enabled value from the configuration. Attribute Name: health-readiness-enabled Description: Whether readiness health reporting is enabled (default) or disabled Default Value: true- Returns:
- the health-readiness-enabled
-
getExchangeName
Gets the exchange.name value from the configuration. Attribute Name: exchange.name Description: The exchange that messages are published to or consumed from. If not set, the channel name is used. If set to "", the default exchange is used.- Returns:
- the exchange.name
-
getExchangeDurable
Gets the exchange.durable value from the configuration. Attribute Name: exchange.durable Description: Whether the exchange is durable Default Value: true- Returns:
- the exchange.durable
-
getExchangeAutoDelete
Gets the exchange.auto-delete value from the configuration. Attribute Name: exchange.auto-delete Description: Whether the exchange should be deleted after use Default Value: false- Returns:
- the exchange.auto-delete
-
getExchangeType
Gets the exchange.type value from the configuration. Attribute Name: exchange.type Description: The exchange type: direct, fanout, headers or topic (default) Default Value: topic- Returns:
- the exchange.type
-
getExchangeDeclare
Gets the exchange.declare value from the configuration. Attribute Name: exchange.declare Description: Whether to declare the exchange; set to false if the exchange is expected to be set up independently Default Value: true- Returns:
- the exchange.declare
-
getExchangeArguments
Gets the exchange.arguments value from the configuration. Attribute Name: exchange.arguments Description: The identifier of the key-value Map exposed as bean used to provide arguments for exchange creation Default Value: rabbitmq-exchange-arguments- Returns:
- the exchange.arguments
-
getTracingEnabled
Gets the tracing.enabled value from the configuration. Attribute Name: tracing.enabled Description: Whether tracing is enabled (default) or disabled Default Value: true- Returns:
- the tracing.enabled
-
getTracingAttributeHeaders
Gets the tracing.attribute-headers value from the configuration. Attribute Name: tracing.attribute-headers Description: A comma-separated list of headers that should be recorded as span attributes. Relevant only if tracing.enabled=true Default Value:- Returns:
- the tracing.attribute-headers
-
validate
public void validate()
-