apache / apache/rocketmq-connect
Specify RocketMQ connect domain model
- Dominant language
- Java
- Stars
- 141
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Each sourceTask and sinkTask in RocketMQ connect architecture have its own conduct logic, the data flow and control flow is controlled by WorkerSinkTask and WorkerSourceTask. We just call current conduct logic as RocketMQ connect domain model, but I found it's not flexible enough. For example, SourceTask only commit after data sink, regardless of success or failure. SinkTask put records to RocketMQ without result handling. IMO, we can add callback for data sink, and open these callback to users.
```java
public abstract class SourceTask {
public boolean dismissFailedMsgs(final List failedRecords) {
// dismiss for sink to RocketMQ failed records
return false;
}
public boolean customerFailedMsgs(final List failedRecords) {
// customer conduct logic for sink to RocketMQ failed records
return false;
}
}
public abstract class SinkTask {
// Callback conduct for success or failed records that sink to RocketMQ
public abstract void put(List var1, CallBack callback) throws ConnectException;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.