Skip to main content
Version: 2.0

Recipient sender plugins

This guide introduces you how to configure Recipient sender plugins.
These plugins allow to generate a payload, using product content and metadata, and send it to another system named recipient.

Here is the list of documented plugins:

All the plugins implements the IRecipientNotifier interface.

developers advice

If you want to create your own implementation of one of these extension points, you need to extend the specific interface indicated.

Common Sender configuration

Abstract class extension

Most of REGARDS OSS Plugins sender are extending the AbstractRabbitMQSender abstract class.
This abstraction above plugins implementation provides a common configuration to manage a plugin that sends event to RabbitMQ exchange.

info

AMQP senders will create the queue and exchange on RabbitMQ on the first message posted on the exchange.
If you want the exchange and queue to exist before that, you need to explicitly create it on RabbitMQ through the RabbitMQ admin interface or inside your playbook inventory.

Configuration parameters are:

NameTypeDefault ValueOptionalDescription
recipientLabelStringYExternal service identifier we want to notify the products to - this information is sent back to the emitter that contacted Notifier
When not specified, the emitter wont know what's the recipient label that received its events
descriptionStringYRecipient plugin description displayed in the REGARDS HMI
exchangeStringRabbitMQ exchange name to publish message to
queueNameStringYRabbitMQ queue name to initialize
queueDeadLetterRoutingKeyStringregards.DLQ if queue needs to be createdYRabbitMQ dead letter routing key on the queue
directNotificationEnabledbooleanfalseYWhen true, indicates this plugin can be used to send to the recipient directly without checking product content against Rule matcher plugins
blockingRequiredbooleanfalseYWhen true, the sender will be informed that the notified resource must be blocked until the sender receives acknowledge from the recipient. Only then, the notified resource can be unlocked.
Why providing RabbitMQ Queue and DLX?

This plugin creates a queue linked to the exchange, to ensure no message will be lost before the subscriber creates its queue.

This abstract class defines following default behavior:

NameTypeValueDescription
ackRequiredbooleanfalseThe emitter that contacted Notifier won't receive any acknowledgement from this notification

Plugin implementation

RabbitMQSender

This plugin is used to send notifications to a specific RabbitMQ exchange with no transformation applied to the input (what Notifier received).
This plugin let you override following configuration:

NameTypeDefault ValueOptionalDescription
ackRequiredbooleanfalseYWhen true, the emitter that contacted Notifier will be awaiting for an acknowledgement message
RabbitMqSender plugin configuration example
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "RabbitMQSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "{exchange name to use}"
},
{
"name": "queueName",
"type": "STRING",
"value": "{queue name to use}"
},
{
"name": "recipientLabel",
"type": "STRING",
"value": "{identifier of the recipient}"
},
{
"name": "ackRequired",
"type": "BOOLEAN",
"value": "{true or false}"
},
{
"name": "description",
"type": "STRING",
"value": "{plugin description}"
},
{
"name": "directNotificationEnabled",
"type": "BOOLEAN",
"value": "{true or false}"
},
{
"name": "blockingRequired",
"type": "BOOLEAN",
"value": "{true or false}"
}
]
}
}

LTA Request Sender

This plugin is designed to submit received features to the LTA manager service.

This plugin received a GeoJSON feature as an input and then send submission request to the LTA manager through AMQP.

warning

This plugin only supports GeoJSON products as input

This plugin lets you override the following configuration :

NameTypeOptionalDescription
dataTypestringNProduct datatype of the generated DTOs
sessionNamePatternstringYPattern to name the session on the dashboard. A regular
expression can be used, in the following way {<jsonPathToAccessProductType>}-#day(.*) where the parameter <jsonPathToAccessProductType\> has to be replaced with the json path to access the product type.
recipientTenantstringYValue of the recipient tenant if this one is different from the one sending the message.
replaceModebooleanNIf true, the request is replaced if it already exists
LtaRequestSender example
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "LtaRequestSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "{exchange name to use}"
},
{
"name": "queueName",
"type": "STRING",
"value": "{queue name to use}"
},
{
"name": "dataType",
"type": "STRING",
"value": "{product datatype}"
},
{
"name": "sessionNamePattern",
"type": "STRING",
"value": "{properties.type}-#day-example"
},
{
"name": "recipientTenant",
"type": "STRING",
"value": "{recipient tenant}"
},
{
"name": "replaceMode",
"type": "STRING",
"value": "{true or false}"
},
{
"name": "dataType",
"type": "STRING",
"value": "{datatype value}",
"dynamic": false
},
{
"name": "recipientLabel",
"type": "STRING",
"value": "{identifier of the recipient}",
"dynamic": false
}
]
}
}

Worker Manager Sender

This plugin is designed to send processing requests to the worker manager service.

This plugin let you override the following configuration :

NameTypeOptionalDescription
sessionNamePatternstringYPattern to name the session on the dashboard. A regular
expression can be used, in the following way {<jsonPathToAccessProductType>}-#day(.*) where the parameter <jsonPathToAccessProductType\> has to be replaced with the json path to access to the product type.
If the session pattern is not provided, session information are retrieved from the request metadata.
contentTypestringNType of the processing that will be used by the Worker Manager to send this request to the right Worker type.
recipientTenantstringYValue of the recipient tenant if this one is different from the one sending the message. If not provided, the current tenant is used.
WorkerManagerSender example
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "WorkerManagerSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "{exchange name to use}"
},
{
"name": "queueName",
"type": "STRING",
"value": "{queue name to use}"
},
{
"name": "contentType",
"type": "STRING",
"value": "{processed product type}"
},
{
"name": "sessionNamePattern",
"type": "STRING",
"value": "{properties.type}-#day-example"
},
{
"name": "recipientTenant",
"type": "STRING",
"value": "{recipient tenant}"
}
]
}
}

Here is an example that send a product to the WorkerManager on the same instance as the FEM:

  • No acknowledge required
  • No direct notification allowed
Send notification to WorkerManager
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "WorkerManagerSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "regards.broadcast.fr.cnes.regards.modules.workermanager.dto.events.in.RequestEvent"
},
{
"name": "contentType",
"type": "STRING",
"value": "<content type defined in the worker manager>"
},
{
"name": "recipientLabel",
"type": "STRING",
"value": "<label of the process done by the worker>",
"dynamic": false
}
]
}
}

Here is an example that send a product to the WorkerManager on the same instance as the FEM:

  • Send notification to the exchange used by the Worker Manager
  • ackRequired is defined to true, so the worker will acknowledge the dissemination. Moreover, blockingRequired is defined to true, which means the notification should prevent the emitter to allow product modification or deletion
  • Administrators can send any product to this worker through HMI, as directNotificationEnabled is true and an HMI description is provided
Send notification to WorkerManager with acknowledge required, direct notification allowed
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "WorkerManagerSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "1.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "regards.broadcast.fr.cnes.regards.modules.workermanager.dto.events.in.RequestEvent"
},
{
"name": "contentType",
"type": "STRING",
"value": "<content type defined in the worker manager>"
},
{
"name": "blockingRequired",
"type": "BOOLEAN",
"value": true,
"dynamic": false
},
{
"name": "description",
"type": "STRING",
"value": "Send notification to <do something using a worker>",
"dynamic": false
},
{
"name": "directNotificationEnabled",
"type": "BOOLEAN",
"value": true,
"dynamic": false
},
{
"name": "recipientLabel",
"type": "STRING",
"value": "<label of the process done by the worker>",
"dynamic": false
},
{
"name": "ackRequired",
"type": "BOOLEAN",
"value": true,
"dynamic": false
}
]
}
}

Dissemination ACK Sender

This plugin is designed to send acknowledge messages to OAIS catalog and FEM catalog.

danger

This plugin does not inherit from the AbstractRabbitMQSender, so Common Sender config parameters are not available.

danger

You need to define either properties to send to FEM catalog either properties to send to OAIS catalog

Configuration parameters, common to GeoJSON FEM catalog or OAIS catalog usage, are:

NameTypeDefault ValueOptionalDescription
senderLabelStringAcknowledge sender label. Used by destination system to identify the current system
recipientLabelStringExternal service identifier we want to notify the products to - this information is sent back to the emitter that contacted Notifier
When not specified, the emitter wont know what's the recipient label that received its events

GeoJSON FEM catalog usage

This plugin let you override following configuration:

NameTypeOptionalDescription
featureDisseminationExchangestringYName of the AMQP exchange to store messages before shovel.
Only use when handling GeoJSON products.
featureDisseminationQueueNamestringYName of the AMQP queue to store messages before shovel.
Only use when handling GeoJSON products.
featureDisseminationUseDedicatedDlqbooleanYWhen true, uses the featureDisseminationQueueName value and adds .DLQ at the end to use it as the DLQ name. When false (default value), use regards.DLQ
FEM catalog DisseminationAckSender example
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "DisseminationAckSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "2.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "{exchange name to use}"
},
{
"name": "queueName",
"type": "STRING",
"value": "{queue name to use}"
},
{
"name": "recipientLabel",
"type": "STRING",
"value": "{identifier of the recipient}"
},
{
"name": "description",
"type": "STRING",
"value": "{plugin description}"
},
{
"name": "directNotificationEnabled",
"type": "BOOLEAN",
"value": "{true or false}"
},
{
"name": "senderLabel",
"type": "STRING",
"value": "{name of current platform used on destination system to acknowledge the dissemination}"
},
{
"name": "featureDisseminationExchange",
"type": "STRING",
"value": "{exchange name to store ACK messages before shovel}"
},
{
"name": "featureDisseminationQueueName",
"type": "STRING",
"value": "{queue name to store ACK messages before shovel}"
}
]
}
}

OAIS catalog usage

This plugin let you override following configuration:

NameTypeOptionalDescription
aipDisseminationExchangestringYName of the exchange to store messages before shovel.
Only use when handling OAIS products.
aipDisseminationQueueNamestringYName of the AMQP queue to store messages before shovel.
Only use when handling OAIS products.
aipQueueDedicatedDlqbooleanYWhen true, uses the aipDisseminationQueueName value and adds .DLQ at the end to use it as the DLQ name. When false (default value), use regards.DLQ
Example de configuration de plugin pour acquitter une diffusion de produits OAIS
{
"key": "fr.cnes.regards.framework.modules.plugins.domain.PluginConfiguration",
"value": {
"pluginId": "DisseminationAckSender",
"label": "{label}",
"businessId": "{uniqueIdentifier}",
"version": "2.0.0",
"priorityOrder": 0,
"active": true,
"parameters": [
{
"name": "exchange",
"type": "STRING",
"value": "{exchange name to use}"
},
{
"name": "queueName",
"type": "STRING",
"value": "{queue name to use}"
},
{
"name": "recipientLabel",
"type": "STRING",
"value": "{identifier of the recipient}"
},
{
"name": "description",
"type": "STRING",
"value": "{plugin description}"
},
{
"name": "directNotificationEnabled",
"type": "BOOLEAN",
"value": "{true or false}"
},
{
"name": "senderLabel",
"type": "STRING",
"value": "{name of current platform used on destination system to acknowledge the dissemination}"
},
{
"name": "aipDisseminationExchange",
"type": "STRING",
"value": "{exchange name to store ACK messages before shovel}"
},
{
"name": "aipDisseminationQueueName",
"type": "STRING",
"value": "{queue name to store ACK messages before shovel}"
}
]
}
}

Common issue

Error while sending notification to receiver

If the RabbitMQ sender plugin fails to send the notification with the error

Error while sending notification to receiver:
inequivalent arg 'x-dead-letter-routing-key' for queue 'xxxx' in vhost 'regards.multitenant.manager': received 'yyyy' but ...

It means that your Notifier configuration is wrong and does not match with the real queue. Check your queue and specifically the DLX and DLK attributes and use these values inside the Notifier configuration.