Components

Components are used to connect routes to external systems and services.

More details - https://camel.apache.org/manual/component.html

EcosRecordsSync Camel Component

EcosRecordsSyncComponent - a Camel component created for iterating/updating records via RecordsAPI. The key for using the component in a Camel context: ecos-records-sync

The component includes both a consumer (EcosRecordsSyncConsumer) and a producer (EcosRecordsSyncProducer) in Camel terminology

Below are examples of registering the component in YAML format, for instance, when registering via Camel DSL.

  1. EcosRecordsSyncConsumer. Extends the standard ScheduledBatchPollingConsumer, implements iteration of records by ECOS type + sourceId. Possible settings for the ecos-records-sync consumer:

Key

Value

syncId

A unique value within the application instance where Camel contexts are running. A state for periodic polling from the sourceId is created based on this value.
see: journalId=ecos-sync-state

syncMode

DEFAULT | CREATE | UPDATE
DEFAULT, UPDATE - iterate records by update date
CREATE - iterate records by creation date

sourceId

type’s sourceId

typeRef

ecos type

batchSize

batch size for polling

Usage example:

- route:
    from:
      uri: ecos-records-sync:testEcosRecordsSync
      parameters:
        delay: 15000
        sourceId: emodel/test-type-mig-from
        typeRef: emodel/type@test-type-mig-from
        batchSize: 5
      steps:
      - to: log:ers-test
  1. EcosRecordsSyncProducer. Extends DefaultProducer, implements record update via RecordsAPI. The data for the update is taken from the message body (id from the body or from the message property - CamelEcosRecordsSyncEntityRef). Possible settings for the ecos-records-sync producer:

Key

Value

syncId

any value, mostly informational

sourceId

type’s sourceId

Usage example:

- route:
    from:
      uri: .....
      steps:
      - to:
          uri: ecos-records-sync:test-type-mig-to
          parameters:
            sourceId: emodel/test-type-mig-to