Class KafkaSinkBuilder<IN>

    • Method Detail

      • setDeliveryGuarantee

        public KafkaSinkBuilder<IN> setDeliveryGuarantee​(org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee)
        Sets the wanted the DeliveryGuarantee. The default delivery guarantee is deliveryGuarantee.
        Parameters:
        deliveryGuarantee -
        Returns:
        KafkaSinkBuilder
      • setTransactionalIdPrefix

        public KafkaSinkBuilder<IN> setTransactionalIdPrefix​(String transactionalIdPrefix)
        Sets the prefix for all created transactionalIds if DeliveryGuarantee.EXACTLY_ONCE is configured.

        It is mandatory to always set this value with DeliveryGuarantee.EXACTLY_ONCE to prevent corrupted transactions if multiple jobs using the KafkaSink run against the same Kafka Cluster. The default prefix is transactionalIdPrefix.

        The size of the prefix is capped by MAXIMUM_PREFIX_BYTES formatted with UTF-8.

        It is important to keep the prefix stable across application restarts. If the prefix changes it might happen that lingering transactions are not correctly aborted and newly written messages are not immediately consumable until the transactions timeout.

        Parameters:
        transactionalIdPrefix -
        Returns:
        KafkaSinkBuilder
      • setBootstrapServers

        public KafkaSinkBuilder<IN> setBootstrapServers​(String bootstrapServers)
        Sets the Kafka bootstrap servers.
        Parameters:
        bootstrapServers - a comma separated list of valid URIs to reach the Kafka broker
        Returns:
        KafkaSinkBuilder