fapaul commented on a change in pull request #17058:
URL: https://github.com/apache/flink/pull/17058#discussion_r699022014
##########
File path: docs/content/docs/connectors/datastream/kafka.md
##########
@@ -613,134 +613,89 @@ Otherwise, the watermarks of the whole application
cannot advance and all time-b
such as time windows or functions with timers, cannot make progress. A single
idle Kafka partition causes this behavior.
Consider setting appropriate [idleness timeouts]({{< ref
"docs/dev/datastream/event-time/generating_watermarks"
>}}#dealing-with-idle-sources) to mitigate this issue.
-## Kafka Producer
-
-Flinkās Kafka Producer - `FlinkKafkaProducer` allows writing a stream of
records to one or more Kafka topics.
+## Kafka Sink
-The constructor accepts the following arguments:
+### Usage
-1. A default output topic where events should be written
-2. A SerializationSchema / KafkaSerializationSchema for serializing data into
Kafka
-3. Properties for the Kafka client. The following properties are required:
- * "bootstrap.servers" (comma separated list of Kafka brokers)
-4. A fault-tolerance semantic
+Kafka sink provides a builder class to construct an instance of a KafkaSink.
The code snippet below
+shows how to write String records to a Kafka topic with a delivery guarantee
of at least once.
-{{< tabs "8dbb32b3-47e8-468e-91a7-43cec0c658ac" >}}
-{{< tab "Java" >}}
```java
DataStream<String> stream = ...
+
+KafkaSink<String> sink = KafkaSink.<String>builder()
+ .setBootstrapServers(brokers)
+ .setRecordSerializer(KafkaRecordSerializationSchema.builder()
+ .setTopic("topic-name")
+ .setKafkaProducerConfig(producerProperties)
Review comment:
Hmm, I think it initially was the only way to specify the
bootstrapserver. I have a look to make it optional
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]