Skip to main content
Version: 1.14

Monitor a delivery request progress

This section describes how to subscribe to delivery response events with AMQP message.

Exchange

Subscribe to the following exchange to receive delivery responses on vhost regards.multitenant.manager:
regards.broadcast.fr.cnes.regards.modules.ltamanager.amqp.output.DeliveryResponseDtoEvent

Get delivery requests response

The REGARDS administrator must create for you a dedicated queue bound to this exchange and allow your RabbitMQ user to access to that queue. By doing so, it let you access to messages from that exchange.

AMQP message format

Headers

Headers are the same for all type of responses.

{
"app_id": "xxx",
"timestamp": "xxx",
"correlation_id": "xxx",
"priority": xxx,
"delivery_mode": 2,
"content_encoding": "UTF-8",
"content_type": "application/json",
"headers": {
"regards.tenant": "xxx"
}
}

GRANTED body

REGARDS publishes a granted notification when the delivery request is valid and ready to be processed.

{
"correlationId": "xxx",
"status": "GRANTED"
}
ParameterTypeOptionalDescription
correlationIdStringNoRequest identifier.
statusStringNoThe request is granted.

DONE body

REGARDS publishes a done notification when the delivery has been processed successfully, i.e, the zip with files ordered has been uploaded to the S3 server.

{
"correlationId": "xxx",
"status": "DONE",
"url": "xxx",
"md5": "xxx"
}
ParameterTypeOptionalDescription
correlationIdStringNoRequest identifier.
statusStringNoThe delivery request has been processed successfully.
urlStringNoS3 formatted zip location (s3://bucket/correlationId/zipName.zip).
md5StringNoZip checksum in MD5 format.

DENIED body

REGARDS publishes a denied notification when the request is not valid.

{
"correlationId": "xxx",
"status": "DENIED",
"message": "xxx",
"errorType": "xxx"
}
ParameterTypeOptionalDescription
correlationIdStringNoRequest identifier.
statusStringNoThe request cannot be processed.
messageStringYesDescription of the error.
errorTypeStringNoAssociated error code.

A request can be invalid, if the delivery request is not well-formed.

How to handle it?

See the request format, fix your payload and submit a new request.

ERROR body

After request has been granted by REGARDS, internal errors may occur. In such case, an error response will be published on the response exchange.

{
"correlationId": "xxx",
"status": "ERROR",
"message": "xxx",
"errorType": "xxx"
}
ParameterTypeOptionalDescription
correlationIdStringNoRequest identifier.
statusStringNoThe request cannot be processed.
messageStringYesDescription of the error.
errorTypeStringNoAssociated error code.

There are several error types:

Error TypeDescription
INVALID_CONTENTThe delivery request is malformed.
FORBIDDENThe provided user is not allowed to access delivery features.
ORDER_LIMIT_REACHEDThe order requested is too big and cannot be performed.
TOO_MANY_SUBORDERSThe order returns more than one sub-order for a given delivery request. Only one sub-order is allowed for now.
EMPTY_ORDERThe order requested contains no data to order.
EXPIREDThe delivery request has expired.
INTERNAL_ERRORAn internal error occurred during the processing of the order.
How to handle it?

Retry later with a new request or contact REGARDS administrators.