Plugin development

Plugin development

  • Consumer plugin
  1. Extends AbstractDataConsumer class
  2. Published by spring.factories:
  3. cn.vbill.middleware.porter.core.consumer.DataConsumer=xxx
  4. Effective through the configuration file:
  5. porter.task[index].consumer.consumerName=pluginName
  • EventConverter(Consumer Source Message Converter Plugin)
  1. Published by spring.factories:
  2. cn.vbill.middleware.porter.core.event.s.EventConverter = \
  3. cn.vbill.middleware.porter.plugin.OggXmlConverter
  4. Effective through the configuration file:
  5. porter.task[index].consumer.converter=oggXml
  • EventProcessor(Custom consumption data extraction plugin)
  1. Can be written in the form of jar, class, source code
  2. Effective through the configuration file:
  3. porter.task[index].consumer.eventProcessor.className=cn.vbill.middleware.porter.plugin.CustomEventProcessor
  4. porter.task[index].consumer.eventProcessor.content=file path
  • Loader plugin
  1. Extends AbstractDataLoader class
  2. Published by spring.factories:
  3. cn.vbill.middleware.porter.core.loader.DataLoader=xxx
  4. Effective through the configuration file:
  5. porter.task[index].loader.loaderName=pluginName
  • Alarm plugin
  1. Not open yet

Plugin registration

  1. Place it in the porter-boot-version/plugins directory and take effect after restarting porter-boot.

Development example

demo