Interface KafkaConnectionContext

All Superinterfaces:
BaseExecutionContext, NativeExecutionContext

public interface KafkaConnectionContext extends NativeExecutionContext
Specialized context for Kafka connection.
Author:
Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com), GraviteeSource Team
  • Method Details

    • callbacks

      Callback[] callbacks()
      Access the array of Callback exchanged during connection. This can be used by a kafka security policy to extract a security token and to authenticate the connection.
      Returns:
      an array of Callback
    • saslMechanism

      String saslMechanism()
      Access the SASL mechanism name used during connection. It can be 'PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512' or 'OAUTHBEARER'.
      Returns:
      the name of the SASL mechanism
    • principal

      org.apache.kafka.common.security.auth.KafkaPrincipal principal()
      Access the principal of the current connection.
      Returns:
      the principal of the current connection.
    • topicIdentityRegistry

      TopicIdentityRegistry topicIdentityRegistry()
      Access the registry of topic identities. This registry store any Kafka topics (by their name & Uuid) from the broker (source=BROKER). But also those which could be created by our policies ( e.g. TopicMappingPolicy ) and used by clients (source=CLIENT). The registry can be used to find the name of a topic from an id or vice versa.
      Returns:
      TopicIdentityRegistry