Skip to main content
Version: 1.16

Publish a request event

Introduction

This section describes how to publish a new request event to the rs-worker-manager microservice with an AMQP message in order to communicate with some workers.

AMQP API

How to

The Regards AMQP API concept describes how AMQP interfaces must be handled to submit events or to subscribe to events.

Exchange

Requests must be published to the REGARDS RabbitMQ exchange:

Exchange (type fanout)Virtual host
regards.broadcast.fr.cnes.regards.modules.workermanager.amqp.events.in.RequestEventregards.multitenant.manager

Request content

Properties

ParameterTypeDescription
app_idStringStandard RabbitMQ property for the application identifier
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

ParameterTypeOptionalDescription
regards.tenantStringNoTenant name depends on the REGARDS instance project configuration.
regards.request.idStringNoRequest identifier.
regards.request.ownerStringNoName of the request provider
regards.request.sessionStringNoName of the session
regards.request.content_typeStringNoContent type of the request (content type accepted by the worker)
Example of the properties and headers of a request event message
{
"priority": 1,
"delivery_mode": 2,
"content_encoding": "UTF-8",
"content_type": "application/json",
"headers": [
{
"regards.tenant": "REGARDS",
"regards.request.id": "requestId"
"regards.request.owner": "owner"
"regards.request.session": "session"
"regards.request.content_type": "contentType"
}
]
}

Body

The content of a request for treatment depends on the worker to whom the request is made. To determine the format of the message content, please refer to the documentation for the worker in question.