Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rocketmq-replicator] Support create producer with connector's params… #463

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

casuallc
Copy link
Contributor

@casuallc casuallc commented Apr 6, 2023

What is the purpose of the change

In source task, producer is create with default config in connect-standalone.conf.

This commit support use connector's config to create producer.

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

casuallc added 2 commits April 6, 2023 16:16
# Conflicts:
#	connectors/rocketmq-replicator/src/main/java/org/apache/rocketmq/replicator/ReplicatorSourceTask.java
@casuallc
Copy link
Contributor Author

casuallc commented Apr 6, 2023

@odbozhou Please take a look.

@odbozhou
Copy link
Contributor

odbozhou commented Apr 6, 2023

In my opinion, this pr has some conflicts with the design of connect
Here is my opinion

  1. There are two kinds of connectors: source and sink. The destination of the source is the RocketMQ cluster where the current Connector Worker cluster is located
  2. Worker configuration should come from connect.conf, just like broker configuration comes from broker.conf
  3. The connector's own configuration should not affect the configuration of the Worker
  4. As part of the rocketmq capability, the replicator can synchronize messages from other rocketmq clusters to the current cluster

1 similar comment
@odbozhou
Copy link
Contributor

odbozhou commented Apr 6, 2023

In my opinion, this pr has some conflicts with the design of connect
Here is my opinion

  1. There are two kinds of connectors: source and sink. The destination of the source is the RocketMQ cluster where the current Connector Worker cluster is located
  2. Worker configuration should come from connect.conf, just like broker configuration comes from broker.conf
  3. The connector's own configuration should not affect the configuration of the Worker
  4. As part of the rocketmq capability, the replicator can synchronize messages from other rocketmq clusters to the current cluster

@casuallc
Copy link
Contributor Author

casuallc commented Apr 6, 2023

The connector is depolyed alone , so we should not bind to only one rocketmq cluster.
We can use the connector as a channel, user can config the source and dest.

And then what's the meaning to config dest.endpoint in rocketmq-replicator ? @odbozhou

@odbozhou
Copy link
Contributor

odbozhou commented Apr 7, 2023

dest.endpoint
dest.endpoint

The connector is depolyed alone , so we should not bind to only one rocketmq cluster. We can use the connector as a channel, user can config the source and dest.

And then what's the meaning to config dest.endpoint in rocketmq-replicator ? @odbozhou

The purpose of dest.endpoint is to allow the replicator to connect itself to the current cluster, so that the ability to automatically create a target topic or automatically create a consumerGroup can be realized.
For example, the replicator_checkpoint topic needs to be created in the checkpoint connector to the target rocketmq cluster.

In addition to the points mentioned above, it is also very important that the consumer side can use its perfect offset management mechanism to easily achieve at least one transmission. Because the producer logic is relatively simple, it can achieve at least one transmission in scenarios with poor network conditions. A transfer is more difficult. This is why replicator uses source to implement instead of sink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants