Configuration

Subscribers can be configured and managed through the dashboard, API and file configuration.

Each individual subscriber requires its own configuration in their respective parameters, however there is also some default configuration required for every subscriber.

Default configuration

The default configuration for a subscriber is required to register the subscriber in Alumio. The parameters are used as individual configuration options per subscriber. Aside from the default DI configuration fields, the following fields are required to configure a subscriber.

Remote

The remote of a subscriber is used to identify where the data came from. A remote should be configured before it is used here. The identifier is expected in this field. So in the case of Magento 2, this would be magento-2.

Entity type

An entity type defines the data structure for an entity and how the data can be identified.

Subscriber

The prototype of a subscriber. It is used to select the (correct) subscriber.

Transformers

Every subscriber can have their own transformers. This can be useful when certain operations should be shared across multiple routes within Alumio, when there is a shared subscriber.

Dashboard configuration

Subscribers can be configured from the dashboard. Under Configuration > Subscribers all available subscribers are shown. Click on an existing subscriber to edit the configuration or click on the Add button to add a new subscriber.

Example of the subscriber create page:

Create subscriber

CLI Configuration

Subscribers can be configured using the CLI. See the management section for all available commands.

File configuration

To register a configuration by file, create a JSON file within the magement directory of a package or Alumio project. Use the register.configuration.json schema definition and the type incoming-configuration.

{
"$schema": "https://di.schema.mediact.com/register.configuration.json",
"type": "incoming-configuration",
"identifier": "acme-stock-subscriber",
"name": "Acme Stock Subscriber",
"description": "Fetch stock positions from the ERP",
"object": {
"parameters": {
"subscriber": {
"type": "acme-stock",
"parameters": {
"location": "warehouse-1",
"limit": "10"
}
},
"entityType": "binary-file",
"remote": "magento-1",
"transformers": [
"set-stock-entity-type"
]
}
}
}