Class AmqpConnectorCommonConfiguration
java.lang.Object
io.smallrye.reactive.messaging.amqp.AmqpConnectorCommonConfiguration
- Direct Known Subclasses:
AmqpConnectorIncomingConfiguration
,AmqpConnectorOutgoingConfiguration
Extracts the common configuration for the
smallrye-amqp
connector.-
Field Summary
-
Constructor Summary
ConstructorDescriptionAmqpConnectorCommonConfiguration
(org.eclipse.microprofile.config.Config config) Creates a new AmqpConnectorCommonConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.microprofile.config.Config
config()
Gets the address value from the configuration.Gets the capabilities value from the configuration.Gets the client-options-name value from the configuration.Gets the client-ssl-context-name value from the configuration.Gets the cloud-events value from the configuration.Gets the connect-timeout value from the configuration.Gets the container-id 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 health-timeout value from the configuration.getHost()
Gets the host value from the configuration.Gets the link-name 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 sni-server-name value from the configuration.Gets the tracing-enabled value from the configuration.Gets the username value from the configuration.Gets the use-ssl 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
-
AmqpConnectorCommonConfiguration
public AmqpConnectorCommonConfiguration(org.eclipse.microprofile.config.Config config) Creates a new AmqpConnectorCommonConfiguration.
-
-
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: amqp-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: amqp-password- Returns:
- the password
-
getHost
Gets the host value from the configuration. Attribute Name: host Description: The broker hostname MicroProfile Config Alias: amqp-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: amqp-port Default Value: 5672- Returns:
- the port
-
getUseSsl
Gets the use-ssl value from the configuration. Attribute Name: use-ssl Description: Whether the AMQP connection uses SSL/TLS MicroProfile Config Alias: amqp-use-ssl Default Value: false- Returns:
- the use-ssl
-
getVirtualHost
Gets the virtual-host value from the configuration. Attribute Name: virtual-host Description: If set, configure the hostname value used for the connection AMQP Open frame and TLS SNI server name (if TLS is in use) MicroProfile Config Alias: amqp-virtual-host- Returns:
- the virtual-host
-
getSniServerName
Gets the sni-server-name value from the configuration. Attribute Name: sni-server-name Description: If set, explicitly override the hostname to use for the TLS SNI server name MicroProfile Config Alias: amqp-sni-server-name- Returns:
- the sni-server-name
-
getReconnectAttempts
Gets the reconnect-attempts value from the configuration. Attribute Name: reconnect-attempts Description: The number of reconnection attempts MicroProfile Config Alias: amqp-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 second between two reconnection attempts MicroProfile Config Alias: amqp-reconnect-interval Default Value: 10- Returns:
- the reconnect-interval
-
getConnectTimeout
Gets the connect-timeout value from the configuration. Attribute Name: connect-timeout Description: The connection timeout in milliseconds MicroProfile Config Alias: amqp-connect-timeout Default Value: 1000- Returns:
- the connect-timeout
-
getContainerId
Gets the container-id value from the configuration. Attribute Name: container-id Description: The AMQP container id- Returns:
- the container-id
-
getAddress
Gets the address value from the configuration. Attribute Name: address Description: The AMQP address. If not set, the channel name is used- Returns:
- the address
-
getLinkName
Gets the link-name value from the configuration. Attribute Name: link-name Description: The name of the link. If not set, the channel name is used.- Returns:
- the link-name
-
getClientOptionsName
Gets the client-options-name value from the configuration. Attribute Name: client-options-name Description: The name of the AMQP Client Option bean used to customize the AMQP client configuration MicroProfile Config Alias: amqp-client-options-name- Returns:
- the client-options-name
-
getClientSslContextName
Gets the client-ssl-context-name value from the configuration. Attribute Name: client-ssl-context-name Description: The name of an SSLContext bean to use for connecting to AMQP when SSL is used MicroProfile Config Alias: amqp-client-ssl-context-name- Returns:
- the client-ssl-context-name
-
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
-
getHealthTimeout
Gets the health-timeout value from the configuration. Attribute Name: health-timeout Description: The max number of seconds to wait to determine if the connection with the broker is still established for the readiness check. After that threshold, the check is considered as failed. Default Value: 3- Returns:
- the health-timeout
-
getCloudEvents
Gets the cloud-events value from the configuration. Attribute Name: cloud-events Description: Enables (default) or disables the Cloud Event support. If enabled on an _incoming_ channel, the connector analyzes the incoming records and try to create Cloud Event metadata. If enabled on an _outgoing_, the connector sends the outgoing messages as Cloud Event if the message includes Cloud Event Metadata. Default Value: true- Returns:
- the cloud-events
-
getCapabilities
Gets the capabilities value from the configuration. Attribute Name: capabilities Description: A comma-separated list of capabilities proposed by the sender or receiver client.- Returns:
- the capabilities
-
validate
public void validate()
-