Skip to main content
Version: 2.0

Configuration Importation/Exportation

The rs-worker-manager configuration is imported or exported in Json format (see in UI Administrator : Microservices menu > rs-worker/manager > Manage backups). The configuration is stored in database.

Microservices settings regroup a set of settings that are specific by tenant and stored in the microservice database.

Import/Export API

To configure some microservice settings for a specific tenant, you need to follow the generic Import/Export service configuration guide, it will help you understand the expected JSON file payload that you can send to the import configuration endpoint.

This configuration can also be imported or exported through the administrator UI.

Configurable parameters

NameTypeDefault valueDescription
skipContentTypesList of StringList of ignored content types by the rs-worker-manager while dispatching requests

Configuration for worker :

NameTypeDescription
workerTypeStringWorker type (maximum length 128: [a-zA-Z0-9-_.]*)
contentTypeInputsList of StringList of content type in worker input
contentTypeOutputStringContent type in worker output
keepErrorsbooleanDefault true. If false, delete requests if worker response is in error. This option is useful if you don't want to allow error requests to be restarted from the workermanager.

This worker configuration is used in rs-worker-manager to determine which content type is accepted by the worker. This content type output is useful in workflow case.

Configuration for workflow of worker :

NameTypeDescription
workflowTypeStringWorkflow type (maximum length 256)
steps-List of steps for a workflow
stepNumberDigitStep number in workflow (unique)
workerTypeStringWorker type (maximum length 128: [a-zA-Z0-9-_.]*)
keepErrorsbooleanDefault true. If false, delete requests if worklow response is in error. This option is useful if you don't want to allow error requests to be restarted from the workermanager.

This configuration indicate the different steps of the workflow and their order. The parameter contentTypeOutput must be a valid with the parameter contentTypeInput defined in the worker by configuration (contentTypeOutput worker1 = contentTypeInput worker2 : for valid chaining between the worker1 to the worker2).

Example

rs-worker-manager configuration file example
{
"microservice": "rs-worker-manager",
"modules": [
{
"module": {
"id": "workermanager",
"name": "Worker Manager module",
"description": "Dispatch request to workers",
"version": "1.8.0",
"author": "REGARDS",
"legalOwner": "CNES",
"documentation": "https://github.com/RegardsOss"
},
"resetBeforeImport": true,
"configuration": [
{
"key": "fr.cnes.regards.framework.modules.tenant.settings.domain.DynamicTenantSetting",
"value": {
"name": "skipContentTypes",
"description": "List of content-types to ignore for requests dispatch.",
"value": "[]",
"defaultValue": "[]",
"className": "java.util.ArrayList"
}
},
{
"key": "fr.cnes.regards.modules.workermanager.dto.WorkflowConfigDto",
"value": {
"workflowType": "lta-request",
"steps": [
{
"stepNumber": 1,
"workerType": "lta-product-zip-extraction-worker"
},
{
"stepNumber": 2,
"workerType": "lta-sip-generator-worker"
}
]
}
},
{
"key": "fr.cnes.regards.modules.workermanager.dto.WorkerConfigDto",
"value": {
"workerType": "lta-product-zip-extraction-worker",
"contentTypeInputs": [
"lta-to-extract-request"
],
"contentTypeOutput": "lta-extracted-request"
}
},
{
"key": "fr.cnes.regards.modules.workermanager.dto.WorkerConfigDto",
"value": {
"workerType": "lta-sip-generator-worker",
"contentTypeInputs": [
"lta-extracted-request"
]
}
},
{
"key": "fr.cnes.regards.modules.workermanager.dto.WorkerConfigDto",
"value": {
"workerType": "delete-files-worker",
"contentTypeInputs": [
"delete-files-request"
]
}
}
]
}
]
}