Skip to main content
Version: 2.0.0

Publish a response event from worker

Introduction​

This section describes how to publish a new response event to rs-worker-manager with an AMQP message from worker after receiving a request from the rs-worker-manager microservice.

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​

Responses have to be published to REGARDS RabbitMQ exchange:

Exchange (type topic)Virtual host
regards.worker.manager.responseregards.multitenant.manager

Request content​

Headers​

ParameterTypeDescription
regards.tenantStringTenant name depends on REGARDS instance project configuration.
regards.request.idStringRequest identifier.
Example of headers of an response event message
"regards.tenant": "tenant"
"regards.request.id": "requestId"
request identifier

This identifier is the correlation identifier that is provided in submission requests from the rs-worker-manager microservice.

Body​

{
"status": "...",
"messages": [
"xxx",
"yyy"
],
"additionalHeaders": {
"key1": "value1",
"key2": "value2"
},
"content": "..."
}
ParameterTypeDescription
statusStringResponse status (RUNNING, INVALID_CONTENT, ERROR, SUCCESS)
messagesList of StringMessages provided by the worker
additionalHeadersList of key/valueAdditional headers for this event
contentbyteThe content supplied by the worker in response will be used in the case of a workflow of workers as the body of the message sent to the next worker.