Slideee commented on code in PR #117:
URL: https://github.com/apache/rocketmq-connect/pull/117#discussion_r860549279
##########
connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/RmqSourceReplicator.java:
##########
@@ -188,7 +195,7 @@ public Class<? extends Task> taskClass() {
}
@Override
- public List<KeyValue> taskConfigs() {
+ public List<KeyValue> taskConfigs(int maxTasks) {
if (!configValid) {
Review Comment:
> The limitation of the previous version of the connect api, if the
replicator wants to provide the ability of multiple tasks, only the replicator
itself can provide the number of tasks, but we found that the ability of
multiple tasks is general, and the replicator should not implement its own
definition configuration, almost every specific connector implementation There
is such a demand, so the specified configuration of the number of tasks should
be unified. It is easier to use the maxTasks provided by the api to unify this
capability. The connector shards the tasks according to the specific storage
sharding. The actual number of task shards should be, For example, by topic,
min (the number of tasks divided by topic, maxTasks) is configured.
Then I think the taskParallelism parameter should be removed and use maxTask
instead of taskParallelism to control the number of tasks. Otherwise, writing
like min (the number of tasks divided by topic, maxTasks) will only increase
the cost of understanding, what do you think?
--
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]