inlong icon indicating copy to clipboard operation
inlong copied to clipboard

[Improve][DataProxy] Unify the Usage of Message Queue

Open dockerzhang opened this issue 3 years ago • 7 comments

Description

Unify the Usage of Message Queue

InLong Component

InLong DataProxy

Are you willing to submit PR?

  • [ ] Yes, I am willing to submit a PR!

Code of Conduct

dockerzhang avatar Jul 11 '22 08:07 dockerzhang

Good idea! I would like to do this.

liangyepianzhou avatar Jul 21 '22 09:07 liangyepianzhou

Motivation

Unify the usages of Zone 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 want to extract the standard part of the code. Remove the other implementation such as xxSink and federationSink, and replace them with the zoneSink.

MQ zone

  • AbstractZoneClusterProducer
  • AbstractZoneSinkContext
  • AbstractZoneProducer
  • AbstractZoneWorker
  • AbstractZoneSink

Implement plan

  • implement AbstractClusterZoneProducer and AbstractSinkZoneContext.
  • Implement the AbstractZoneProducer.
  • implement the AbstractZoneSink and AbstractZoneWork.
  • Remove the other implementation such as xxSink and federationSink, and replace them with the zoneSink.
  • Add a document about how to extend xxZoneMQ.

liangyepianzhou avatar Jul 27 '22 13:07 liangyepianzhou

@liangyepianzhou lia we do not need federation now, you can only keep zone for multi-MQ clusters.

dockerzhang avatar Aug 01 '22 07:08 dockerzhang

OK, thank you for your feedback. I have modify my proposal to delete other parts except MQ zone.

liangyepianzhou avatar Aug 02 '22 03:08 liangyepianzhou

The issue is adding the missing zone sink test.

liangyepianzhou avatar Aug 02 '22 07:08 liangyepianzhou

The Doc issue can be found at here.

liangyepianzhou avatar Aug 06 '22 14:08 liangyepianzhou

@dockerzhang @healchow The code and documentation for this issue have been completed. In order to better show the final effect and avoid the speed of review affecting the development of the code, the previous small PRs are divided into different commits in a PR. Please help review it when you have time, THX.

liangyepianzhou avatar Aug 06 '22 14:08 liangyepianzhou