Class AmqpConnectorCommonConfiguration

    • Field Detail

      • config

        protected final org.eclipse.microprofile.config.Config config
    • Constructor Detail

      • AmqpConnectorCommonConfiguration

        public AmqpConnectorCommonConfiguration​(org.eclipse.microprofile.config.Config config)
        Creates a new AmqpConnectorCommonConfiguration.
    • Method Detail

      • config

        public org.eclipse.microprofile.config.Config config()
        Returns:
        the connector configuration
      • getFromAlias

        protected <T> Optional<T> getFromAlias​(String alias,
                                               Class<T> type)
        Retrieves the value stored for the given alias.
        Type Parameters:
        T - the targeted type
        Parameters:
        alias - the attribute alias, must not be null or blank
        type - the targeted type
        Returns:
        the configuration value for the given alias, empty if not set
      • getFromAliasWithDefaultValue

        protected <T> T getFromAliasWithDefaultValue​(String alias,
                                                     Class<T> type,
                                                     T defaultValue)
        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 be null or blank
        type - the targeted type
        defaultValue - the default value
        Returns:
        the configuration value for the given alias, empty if not set
      • getChannel

        public String getChannel()
        Returns:
        the channel name
      • getUsername

        public Optional<String> 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

        public Optional<String> 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

        public String 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

        public Integer 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

        public Boolean 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

        public Optional<String> 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

        public Optional<String> 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

        public Integer 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

        public Integer 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

        public Integer 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

        public Optional<String> getContainerId()
        Gets the container-id value from the configuration. Attribute Name: container-id Description: The AMQP container id
        Returns:
        the container-id
      • getAddress

        public Optional<String> 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

        public Optional<String> 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

        public Optional<String> 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
      • getTracingEnabled

        public Boolean 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

        public Integer 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

        public Boolean 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
      • validate

        public void validate()