Skip to main content
Version: 2.0

Subscribe to AMQP responses

Introduction

This section describes how to subscribe to events sent by rs-fem microservice about submitted requests.

Feature manager or rs-fem microservice publishes AMQP messages to monitor request lifecycle.

Regards AMQP api

To learn more about global description of REGARDS AMQP api see Regards AMQP API.

Exchange

Responses from REGARDS are sent to this exchange :

ExchangeVirtual host
regards.broadcast.fr.cnes.regards.modules.feature.dto.event.out.FeatureRequestEventregards.multitenant.manager

Queue

To subscribe to these messages, first you have to create your own queue and bind it to this exchange. To learn how to subscribe to these messages with a custom queue, see Regards AMQP API.

Message format

Properties

ParameterTypeDescription
app_idStringStandard RabbitMQ property to track message origin.
priorityIntegerStandard RabbitMQ property to sort messages by priority order.
content_encodingStringStandard RabbitMQ property for the encoding type of the message
content_typeStringStandard RabbitMQ property for the MIME Type of the message sent
delivery_modeIntegerStandard RabbitMQ property for the delivery mode (persistent or not)

Headers

ParameterTypeDescription
regards.tenantStringThe tenant or project to request. It must be an existing Regards tenant.

Body

{
"requestId": "{requestId}",
"type": "{requestType}",
"id": "{featureId}",
"urn": "{featureUrn}",
"requestOwner": "{requestOwner}",
"state": "{state}",
"errors": [
"error"
]
}
ParameterTypeDescription
requestIdStringRequest unique identifier.
typeStringRequest type can be CREATION, PATCH, DELETION or NOTIFICATION
idStringFeature id. This parameter is the same as the provided one in the submission request
urnStringThe related feature urn. May not be provided if feature is not created yet.
stateStringState of the submitted request.
Can be GRANTED, DENIED, SUCCESS or ERROR.
requestOwnerStringOwner of the request (provided in the submitted request)
errorsList<String>Optional error messages to inform about request process errors

Example of DENIED request

{
"requestId": "request-exaple-001",
"requestOwner": "example-owner",
"id": "ProductExample001",
"type": "CREATION",
"state": "DENIED",
"errors": [
"Missing parameter in properties"
]
}

Example of GRANTED request

{
"requestId": "request-exaple-001",
"requestOwner": "example-owner",
"id": "ProductExample001",
"type": "CREATION",
"state": "GRANTED"
}

Example of SUCCESS request

{
"requestId": "request-exaple-001",
"requestOwner": "example-owner",
"id": "ProductExample001",
"urn": "URN:FEATURE:DATA:tenant-example:1df31af9-ebcf-32b8-b8d8-8b0a586bc493:V1",
"type": "CREATION",
"state": "SUCCESS"
}

Example of ERROR request

{
"requestId": "request-exaple-001",
"requestOwner": "example-owner",
"id": "ProductExample001",
"type": "CREATION",
"state": "ERROR",
"errors": [
"Unable to store associated file"
]
}