liangyepianzhou commented on issue #4962: URL: https://github.com/apache/inlong/issues/4962#issuecomment-1196769403
## Motivation Unify the usages of Message Queue. Now the sink and process for the MQ in the data proxy is chaotic. There is a lot of redundant code here, which makes the code's expansion and maintenance ability very poor. ## Modification We would like to extract the standard part of the code. We can extract 5 Abstract Classes for the normal MQ, MQ zone, and MQ federation. * AbstractClusterProducer * AbstractSinkContext * AbstractProducer * AbstractWorker * AbstractSink And then the MQ zone, and MQ federation do another abstraction on the basis of the upper layer. ### MQ zone * AbstractZoneClusterProducer * AbstractZoneSinkContext * AbstractZoneProducer * AbstractZoneWorker * AbstractZoneSink ### MQ federation * AbstractfederationClusterProducer * AbstractfederationSinkContext * AbstractfederationProducer * AbstractfederationWorker * AbstractfederationSink And extract an Abstract Class for MQ and extract the send message callback and create client callback for all MQ. * SendMessageCallBack * CreatClientCallBack ## Implement plan * PR1:implement the 5 Abstract Classes for the normal MQ, which only extract the most normal method. And unify it for normal sink and single message sink. * PR2: implement AbstractClusterZoneProducer and AbstractSinkZoneContext. * PR3:Implement the AbstractZoneProducer. * PR4:implement the AbstractZoneSink and AbstractZoneWork. * PR5: implement the abstract class for federation. -- 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]
