|
1 |
| -# Trigger function from RabbitMQ |
| 1 | +# Trigger functions from RabbitMQ |
2 | 2 |
|
3 | 3 | Trigger OpenFaaS functions from RabbitMQ messages.
|
4 | 4 |
|
@@ -58,26 +58,28 @@ Take a look at the logs of the printer function to inspect the invocations made
|
58 | 58 | ```bash
|
59 | 59 | faas-cli logs printer
|
60 | 60 |
|
61 |
| -2024-12-02T16:58:49Z X-Forwarded-For=[10.42.0.4:58102] |
62 |
| -2024-12-02T16:58:49Z X-Msg-Id=[1] |
63 |
| -2024-12-02T16:58:49Z X-Start-Time=[1733158729048068067] |
64 |
| -2024-12-02T16:58:49Z X-Call-Id=[ea459d66-e1af-4846-9f73-18561f69074f] |
65 |
| -2024-12-02T16:58:49Z X-Connector=[connector-sdk] |
66 |
| -2024-12-02T16:58:49Z X-Topic=[queue1] |
67 |
| -2024-12-02T16:58:49Z User-Agent=[openfaas-gateway/0.4.34] |
68 |
| -2024-12-02T16:58:49Z Accept-Encoding=[gzip] |
69 |
| -2024-12-02T16:58:49Z Content-Type=[text/plain] |
70 |
| -2024-12-02T16:58:49Z X-Forwarded-Host=[gateway.openfaas:8080] |
71 |
| -2024-12-02T16:58:49Z |
72 |
| -2024-12-02T16:58:49Z Hello, Task Queue! |
73 |
| -2024-12-02T16:58:49Z |
74 |
| -2024-12-02T16:58:49Z 2024/12/02 16:58:49 POST / - 202 Accepted - ContentLength: 0B (0.0003s) |
| 61 | +2024-12-03T14:36:03Z X-Connector=[connector-sdk openfaasltd/rabbitmq-connector] |
| 62 | +2024-12-03T14:36:03Z X-Topic=[queue1] |
| 63 | +2024-12-03T14:36:03Z Accept-Encoding=[gzip] |
| 64 | +2024-12-03T14:36:03Z Content-Type=[text/plain] |
| 65 | +2024-12-03T14:36:03Z X-Call-Id=[d0ab9f9e-0c93-46b1-a4dd-695a037acb38] |
| 66 | +2024-12-03T14:36:03Z 2024/12/03 14:36:03 POST / - 202 Accepted - ContentLength: 0B (0.0003s) |
| 67 | +2024-12-03T14:36:03Z X-Forwarded-Host=[gateway.openfaas:8080] |
| 68 | +2024-12-03T14:36:03Z X-Rabbitmq-Msg-Id=[1] |
| 69 | +2024-12-03T14:36:03Z X-Start-Time=[1733236563468386644] |
| 70 | +2024-12-03T14:36:03Z X-Forwarded-For=[10.42.0.13:55796] |
| 71 | +2024-12-03T14:36:03Z X-Rabbitmq-Routing-Key=[queue1] |
| 72 | +2024-12-03T14:36:03Z User-Agent=[openfaas-gateway/0.4.34] |
| 73 | +2024-12-03T14:36:03Z |
| 74 | +2024-12-03T14:36:03Z Hello, Task Queue! |
| 75 | +2024-12-03T14:36:03Z |
75 | 76 | ```
|
76 | 77 |
|
77 | 78 | Additional headers are made available to the request. These headers contain RabbitMQ message metadata.
|
78 | 79 |
|
79 | 80 | * `X-Topic` - topic that triggered the function.
|
80 |
| -* `X-Msg-Id` - the message identifier. |
| 81 | +* `X-Rabbitmq-Msg-Id` - the message identifier. |
| 82 | +* `X-Rabbitmq-Routing-Key` - the routing key of the message. |
81 | 83 |
|
82 | 84 | The default content-type is configured as `text/plain`, but can be changed to another content-type such as `application/json` or `application/octet-stream` by the [values.yaml file](https://github.com/openfaas/faas-netes/blob/master/chart/kafka-connector/values.yaml) for the connector.
|
83 | 85 |
|
|
0 commit comments