lizhiboo opened a new issue, #180:
URL: https://github.com/apache/rocketmq-connect/issues/180
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<ConnectRecord>
failedRecords) {
// dismiss for sink to RocketMQ failed records
return false;
}
public boolean customerFailedMsgs(final List<ConnectRecord>
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<ConnectRecord> var1,
CallBack<SuccessRecords,FailedRecords> callback) throws ConnectException;
}
```
--
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]