Interface KafkaEventListenerConfiguration


@StaticInitSafe @ConfigMapping(prefix="polaris.event-listener.kafka") public interface KafkaEventListenerConfiguration
Configuration for the Kafka Event Listener.

Publishes Polaris events to a Kafka topic. The key for the Kafka record is the UUID of the Polaris event. To preserve FIFO behavior in the Kafka stream of the Polaris events a single partition should be used.

The value of Kafka record is JSON encoded as a String. It consists of a set of key values. The set of keys included depends on the Polaris event type and are listed below. The type of value is String except for keys source, destination, table_identifier, view_identifier, namespace and activated_roles which are all encoded as an array of Strings.

  • event_type
  • timestamp (ISO-8601 representation)
  • source (source of table rename if the event is a table rename)
  • destination (destination of table rename if the event is a table rename)
  • table_name
  • namespace
  • table_identifier
  • view_identifier
  • view_name
  • namespace_name
  • catalog_name
  • realm_id
  • principal
  • activated_roles
  • request_id
  • Method Summary

    Modifier and Type
    Method
    Description
    Kafka properties to pass to the Kafka client producer, for example bootstrap.servers is required.
    boolean
    The synchronous mode setting for sending events to Kafka.
    The Kafka topic to send Polaris events to.
  • Method Details

    • topic

      @WithName("topic") @WithDefault("polaris-catalog-events") String topic()
      The Kafka topic to send Polaris events to.

      Configuration property: polaris.event-listener.kafka.topic

    • synchronousMode

      @WithName("synchronous-mode") @WithDefault("false") boolean synchronousMode()
      The synchronous mode setting for sending events to Kafka.

      When set to "true", when events are sent to Kafka the event handling thread will wait for the events to be delivered to Kafka, which may impact performance. When set to "false" (default), events are sent asynchronously.

      Configuration property: polaris.event-listener.kafka.synchronous-mode

      Returns:
      a boolean value indicating the synchronous mode setting
    • properties

      Map<String,String> properties()
      Kafka properties to pass to the Kafka client producer, for example bootstrap.servers is required. This can be used to configure authentication (e.g., SASL, SSL) or other Kafka producer properties.

      Configuration property: polaris.event-listener.kafka.properties