Skip to main content
Version: 1.15

Submit product AMQP

This section describes how to submit a new product to the LTA service of REGARDS thanks to AMQPS interfaces.

Introduction

The diagram below explains the global processing of a new product submission request by REGARDS system.
For a REGARDS client using message queuing, the main steps are:

  1. Publish your product archive request containing product information to REGARDS Rabbitmq server.
  2. Wait for notifications from REGARDS on its Rabbitmq server. Those notifications will inform you about your request progression. Request status lifecycles can be :
  • DENIED : Your request has been denied (possibly malformed request).
  • GRANTED -> ERROR : Your request has been granted, but an internal error happened.
  • GRANTED -> SUCCESS : Your request has been granted and processed with success.

sequence

Submit Product creation request

Exchange

Submission requests have to be published to REGARDS Rabbitmq exchange:

ExchangeVirtual host
regards.broadcast.fr.cnes.regards.modules.ltamanager.amqp.input.SubmissionRequestDtoEventregards.multitenant.manager

Request format

Message headers

"regards.tenant": "tenant"
"regards.request.owner": "owner"
ParameterTypeOptionalDescription
regards.tenantStringNoTenant name depends on REGARDS instance project configuration
regards.request.ownerStringNoName of the request provider.

Message body content

{
"correlationId": "xxx",
"productId": "xxx",
"datatype": "xxx",
"geometry": {
"coordinates": [
[
[
0.07604560969926086,
43.98314313658291
],
[
0.14096031674824933,
43.99467654310261
],
[
0.05530723606827761,
43.957963973072
],
[
0.07604560969926086,
43.98314313658291
]
]
],
"type": "Polygon"
},
"files": [
{
"type": "THUMBNAIL",
"url": "file:/input/LTA/2519/thumbnail-4.png",
"filename": "thumbnail-4.png",
"checksumMd5": "fb8613574312c47f215343ebebaf8ebf",
"mimeType": "image/png"
},
{
"type": "RAWDATA",
"url": "file:/input/LTA/2519/product-4.zip",
"filename": "product-4.zip",
"checksumMd5": "ff3d0a4640b403a02007b0039640607b",
"mimeType": "application/zip"
},
{
"type": "RAWDATA",
"url": "file:/input/LTA/2519/product-4-meta.xml",
"filename": "product-4-meta.xml.",
"checksumMd5": "fcd0e49a6f85e67ae6d2149a1f67d567",
"mimeType": "application/xml"
}
],
"storePath": "",
"session": "",
"replaceMode": false,
"tags": [
"tag1",
"tag2"
],
"properties": {}
}
ParameterTypeOptionalDescription
correlationIdStringNoIdentifier to track this request during the entire workflow. It must be unique.
productIdStringNoProduct identifier. If two products are submitted with the same id, a new version is created or the previous one is replaced.
datatypeStringNoProduct datatype. Must be present in the lta-manager configuration.
geometryGeoJSON RFC 7946YesProduct geometry in GeoJSON RFC 7946 Format.
filesObjectNoFiles linked to the product. At least one is required.
files.typeStringNoType of the file can be RAWDATA, THUMBNAIL, QUICKLOOK_SD, QUICKLOOK_MD or QUICKLOOK_HD
files.urlStringNoLocation of the file. Only http(s) or file protocols are accepted.
files.filenameStringNoFile name
files.checksumMd5StringNoFile MD5 checksum
files.mimeTypeStringNoFile mime type
storePathPathYesPath to manually define the destination location for files on archival system. If null, the storePath will be built from the lta-manager configuration.
sessionStringYesSession to monitor the generation of the product. If not provided, a default session will be used.
replaceModeBooleanYesdefault false - Defines whether a product with the same id should be replaced or duplicated with a new version.
tagsStringsYesOptional labels to add in product metadata tags
propertiesjson objectNoProduct metadata, Map of key/value properties. Mandatory properties depends on product datatype.

If two products are submitted with the same provider id :

  • if you specify replaceMode=false, a new version is created (V2, V3...)
  • if you specify replaceMode=true, the previous version is replaced
First creation

If that's the first time you submit a product (no product with same providerId is present on OAIS catalog), both endpoint create a first version of the product.

Integrity

REGARDS system will ensure integrity verification of each file of your product by checking provided md5 checksum after each file copy.

Click on the link Get product progress AMQP just below, you will discover responses RS-LTA-MANAGER will send you for your submission request.