wuchong commented on a change in pull request #8843: [FLINK-12945][docs] 
Translate RabbitMQ Connector page into Chinese
URL: https://github.com/apache/flink/pull/8843#discussion_r298821680
 
 

 ##########
 File path: docs/dev/connectors/rabbitmq.zh.md
 ##########
 @@ -47,44 +43,30 @@ This connector provides access to data streams from 
[RabbitMQ](http://www.rabbit
 </dependency>
 {% endhighlight %}
 
-Note that the streaming connectors are currently not part of the binary 
distribution. See linking with them for cluster execution 
[here]({{site.baseurl}}/dev/projectsetup/dependencies.html).
+注意连接器现在没有包含在二进制发行版中。集群执行的相关信息请参考 
[here]({{site.baseurl}}/zh/dev/projectsetup/dependencies.html).
 
-#### Installing RabbitMQ
-Follow the instructions from the [RabbitMQ download 
page](http://www.rabbitmq.com/download.html). After the installation the server 
automatically starts, and the application connecting to RabbitMQ can be 
launched.
+#### 安装 RabbitMQ
+安装 RabbitMQ 请参考 [RabbitMQ download 
page](http://www.rabbitmq.com/download.html)。安装完成之后,服务会自动拉起,应用程序就可以尝试 连接到 
RabbitMQ 了。
 
 #### RabbitMQ Source
 
-This connector provides a `RMQSource` class to consume messages from a RabbitMQ
-queue. This source provides three different levels of guarantees, depending
-on how it is configured with Flink:
-
-1. **Exactly-once**: In order to achieve exactly-once guarantees with the
-RabbitMQ source, the following is required -
- - *Enable checkpointing*: With checkpointing enabled, messages are only
- acknowledged (hence, removed from the RabbitMQ queue) when checkpoints
- are completed.
- - *Use correlation ids*: Correlation ids are a RabbitMQ application feature.
- You have to set it in the message properties when injecting messages into 
RabbitMQ.
- The correlation id is used by the source to deduplicate any messages that
- have been reprocessed when restoring from a checkpoint.
- - *Non-parallel source*: The source must be non-parallel (parallelism set
- to 1) in order to achieve exactly-once. This limitation is mainly due to
- RabbitMQ's approach to dispatching messages from a single queue to multiple
- consumers.
-
-
-2. **At-least-once**: When checkpointing is enabled, but correlation ids
-are not used or the source is parallel, the source only provides at-least-once
-guarantees.
-
-3. **No guarantee**: If checkpointing isn't enabled, the source does not
-have any strong delivery guarantees. Under this setting, instead of
-collaborating with Flink's checkpointing, messages will be automatically
-acknowledged once the source receives and processes them.
-
-Below is a code example for setting up an exactly-once RabbitMQ source.
-Inline comments explain which parts of the configuration can be ignored
-for more relaxed guarantees.
+`RMQSource` 负责从 RabbitMQ 中消费数据,可以配置三种不同级别的保证:
+
+1. **精确一次**: 保证精确一次需要以下条件 -
+ - *开启 checkpointing*: 开启 checkpointing 之后,消息在 checkpoints 
+ 完成之后才会被确认(然后从 RabbitMQ 队列中删除).
+ - *使用关联标识(Correlation ids)*: 关联标识是 RabbitMQ 的一个特性,消息写入 RabbitMQ 时在消息属性中设置。
+ 从 checkpoint 恢复时利用关联标识对被 Source 再次处理的消息进行去重。
+ - *非并发 source*: 为了保证精确一次的数据投递,source 必须是非并发的(并行度设置为1。
+  这主要是由 RabbitMQ 单队列向多个消费者投递消息的方式决定的。
 
 Review comment:
   ```suggestion
     这主要是由于 RabbitMQ 分发数据时是从单队列向多个消费者投递消息的。
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to