Skip to content

Commit 20b02a3

Browse files
weltekialexellis
authored andcommitted
Update rabbitmq message example and request headers
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent 886798a commit 20b02a3

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

docs/openfaas-pro/rabbitmq-events.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Trigger function from RabbitMQ
1+
# Trigger functions from RabbitMQ
22

33
Trigger OpenFaaS functions from RabbitMQ messages.
44

@@ -58,26 +58,28 @@ Take a look at the logs of the printer function to inspect the invocations made
5858
```bash
5959
faas-cli logs printer
6060
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
7576
```
7677

7778
Additional headers are made available to the request. These headers contain RabbitMQ message metadata.
7879

7980
* `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.
8183

8284
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.
8385

0 commit comments

Comments
 (0)