You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services/mq-interceptor/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The MQ-interceptor solves both of these problems by performing the following tas
34
34
35
35
- MQ-interceptor first connects to a PostgreSQL database server to access a table containing mappings between EGA user IDs and Elixir user IDs.
36
36
- MQ-interceptor then connects to the Local MQ server and continuously consumes messages from the following queues: _inbox_, _verified_, _completed_ and _error_ (these names are hardcoded). The messages are reposted on the Central MQ server to the exchange configured by the `CEGA_MQ_EXCHANGE` environment variable. If the JSON-body of the message contains a "type" field, the new routing key will be based on this field. If not, the routing key will be set to the original queue name prefixed with "files." (hardcoded). For instance, messages read from the "verified" queue on the Local MQ server will be reposted with the routing key "files.verified" on the Central MQ server if they don’t have a "type" field.
37
-
- MQ-interceptor also connects to the Central MQ server and continuously consumes messages from the single queue configured with the `CEGA_MQ_QUEUE` environment variable (usually "v1.files"). These messages are reposted on the Local MQ server to the exchange configured by the `LEGA_MQ_EXCHANGE` variable with a new routing key based on the `LEGA_MQ_QUEUE` variable. (Note that these messages may later be reposted internally on the Local MQ server with new routing keys by a second interceptor service, such as [SDA-interceptor](https://github.com/neicnordic/sensitive-data-archive/blob/main/sda/cmd/intercept/intercept.md)).
37
+
- MQ-interceptor also connects to the Central MQ server and continuously consumes messages from the single queue configured with the `CEGA_MQ_QUEUE` environment variable (usually "v1.files"). These messages are reposted on the Local MQ server to the exchange configured by the `LEGA_MQ_EXCHANGE` variable with a new routing key based on the `LEGA_MQ_ROUTING_KEY` variable. (Note that these messages may later be reposted internally on the Local MQ server with new routing keys by a second interceptor service, such as [SDA-interceptor](https://github.com/neicnordic/sensitive-data-archive/blob/main/sda/cmd/intercept/intercept.md)).
38
38
- Before any message is reposted, the MQ-interceptor checks the JSON-formatted body of the message and replaces the value of the "user" field (if present) based on mappings obtained from the PostgreSQL database. For messages sent from CEGA to LEGA, the EGA user ID in the original message is replaced with an Elixir user ID ([Life Science Login](https://lifescience-ri.eu/ls-login/) ID), and vice versa for the opposite direction.
39
39
- If a message was successfully reposted, an ACK (acknowledgement message) is posted back on the channel that the message was obtained from.
40
40
- If a message could not be successfully converted or reposted, a NACK (negative acknowledgement) is posted back on the channel that the message was obtained from. If the message could not be converted, an error message is also posted to the error channel (`CEGA_MQ_EXCHANGE` with routing key "files.error")
@@ -69,7 +69,7 @@ The MQ-interceptor service can be configured by setting the following environmen
69
69
| CEGA_MQ_QUEUE | The name of the queue to read messages from on the Central MQ server. Suggested value: "v1.files" |
70
70
| LEGA_MQ_CONNECTION | A connection string for connecting to the Local EGA message server.<br>`amqps://<user>:<password>@<host>:<port>/<vhost>[?parameters]`|
71
71
| LEGA_MQ_EXCHANGE | The name of the exchange to post messages to on the Local MQ server. Suggested value: "sda" |
72
-
|LEGA_MQ_QUEUE| The name of the queue in the Local MQ server that messages coming from Central MQ should be forwarded to. This value is used as the routing key. Suggested value: "files" |
72
+
|LEGA_MQ_ROUTING_KEY| The name of the queue in the Local MQ server that messages coming from Central MQ should be forwarded to. This value is used as the routing key. Suggested value: "files" |
73
73
| POSTGRES_CONNECTION | A connection string for the PostgreSQL database containing the user ID mappings.<br>`postgres://[username]:[password]@[host]:5432/[database]`|
74
74
| VERIFY_CERT | If this is set to FALSE, the client will not verify the servers’ certificate chain and host name and will thus accept any certificate presented by the server and any host name in that certificate. This should only be set to FALSE for testing purposes. |
0 commit comments