Subscribe to products submission requests events (SIP)
Introduction
This section describes how to subscribe to events sent by rs-ingest microservice about submitted products requests as described in Submit Product SIP guide.
After your SIP Submission request is sent you will receive :
- A GRANTED or a DENIED response to inform you if your request has been accepted or not.
- A SUCCESS or an ERROR response to inform you that your request has been processed.
Requests and responses are linked with a correlation identifier : requestId that is provided into submission requests and added in service responses.
Regards AMQP api
The Regards AMQP API concept describe how AMQP interfaces must be handled to submit events or to subscribe to events.
Exchange
SIP submission responses from REGARDS are sent to exchange :
Exchange | Virtual host |
---|---|
regards.broadcast.fr.cnes.regards.modules.ingest.dto.request.event.IngestRequestEvent | regards.multitenant.manager |
Queue
Every consumer of this exchange must create its own queue bound to this exchange.
Message format
Properties
Parameter | Type | Description |
---|---|---|
app_id | String | Standard RabbitMQ property to track message origin. |
priority | Integer | Standard RabbitMQ property to sort messages by priority order. |
content_encoding | String | Standard RabbitMQ property for the encoding type of the message |
content_type | String | Standard RabbitMQ property for the MIME Type of the message sent |
delivery_mode | Integer | Standard RabbitMQ property for the delivery mode (persistent or not) |
Headers
Parameter | Type | Description |
---|---|---|
regards.tenant | String | Tenant name depends on REGARDS instance project configuration. |
regards.type | String | Type of content of the message |
Example of the properties and headers of an Ingest request event message
{
"app_id": "{ID of app}",
"priority": 1,
"delivery_mode": 2,
"content_encoding": "UTF-8",
"content_type": "application/json",
"headers": [
{
"regards.tenant": "REGARDS",
"regards.type": "fr.cnes.regards.modules.ingest.dto.request.event.DisseminationAckEvent"
}
]
}
Body
{
"requestId": "xxxxxxxxxxxx",
"providerId": "yyyyyyyyy",
"sipId": "URN:SIP:DATA:xxxxxxxxxxxx:V1",
"state": "",
"errors": []
}
Parameter | Type | Description |
---|---|---|
requestId | String | Request unique identifier. This identifier is the same as the provided one in the SIP submission request |
providerId | String | SIP providerId. This parameter is the same as the provided one in the SIP submission request |
sipId | String | Unique SIP identifier generated by rs-ingest service with URN format |
state | String | State of the SIP submission request |
errors | List<String\> | Optional error messages to inform about request process errors |