KafkaConnectionResolver

Helper class that resolves a Kafka connection and credential parameters, validates them and generates connection options.

Implements: IReferenceable, IConfigurable

Description

The KafkaConnectionResolver class is used to resolve Kafka connections and credential parameters, validate them and generate connection options.

Configuration parameters

  • connection(s):
    • discovery_key: (optional) key to retrieve the connection from IDiscovery
    • host: host name or IP address
    • port: port number
    • uri: resource URI or connection string with all parameters in it
  • credential(s):
    • store_key: (optional) key to retrieve the credentials from ICredentialStore
    • username: username
    • password: user’s password

References

  • *:discovery:*:*:1.0 - (optional) IDiscovery services
  • *:credential-store:*:*:1.0 - (optional) credential stores to resolve credentials

Fields

_connectionResolver

Connection resolver.

_connection_resolver: ConnectionResolver

_credentialResolver

Credential resolver.

_credential_resolver: CredentialResolver

Instance methods

compose

Composes Kafka connection options from connection and credential parameters.

compose(correlation_id: Optional[str], connections: List[ConnectionParams], credential: CredentialParams): Any

  • correlation_id: Optional[str] - (optional) transaction id used to trace execution through the call chain.
  • connections: List[ConnectionParams] - connection parameters
  • credential: CredentialParams - credential parameters
  • returns: Any - resolved Kafka connection options.

configure

Configures the component by passing its configuration parameters.

configure(config: ConfigParams)

  • config: ConfigParams - configuration parameters to be set.

resolve

Resolves Kafka connection options from connection and credential parameters.

resolve(correlation_id: Optional[str]): ConfigParams

  • correlation_id: Optional[str] - (optional) transaction id used to trace execution through the call chain.
  • returns: ConfigParams - resolved Kafka connection options.

set_references

Sets references to dependent components.

set_references(references: IReferences)

  • references: IReferences - references to locate the component’s dependencies.