Use the queues parameter to configure a list of queues to which the connector should subscribe. When a message is received on a queue, the connector will invoke any function that has the queue name listed in its topic annotation.
Queue configuration:
name - The name of the queue. (Required)
durable - Specifies whether the queue should survive broker restarts.
nowait - Whether to wait for confirmation from the server when declaring the queue.
autodelete - Whether the queue should be deleted automatically when no consumers are connected.
exclusive - Specifies whether the queue should be exclusive to the connection that created it.
If your RabbitMQ requires a TLS connection make sure to use amqps:// as the scheme in the url.
To test the connector, you can deploy the printer function. It prints out the HTTP headers and body of any invocation.
Add an annotation topic=queue1 so that the function is invoked for any message published to the queue with name queue1.
Each time a function is invoked by the connector it will receive the message from the queue as the HTTP body.
Additional headers are made available to the request. These headers contain RabbitMQ message metadata.
X-Topic - topic that triggered the function.
X-Rabbitmq-Msg-Id - the message identifier.
X-Rabbitmq-Routing-Key - the routing key of the message.
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 for the connector.