Example:
rabbit_upstream:
rabbitmq_upstream.present:
- name: upstream_1
- uri: amqp://my_user:my_password@rabbitmq_host
- trust_user_id: True
- ack_mode: on-confirm
- max_hops: 1
New in version 3000.
Ensure the named upstream is absent.
New in version 3000.
Ensure the RabbitMQ upstream exists.
name (str) -- The name of the upstream connection
uri (str) -- The URI to connect to. If upstream is a cluster and can have several URIs, you can enter them here separated by spaces. Examples: - amqp://user:password@server_name - amqp://user:password@server_name/vhost When connecting with SSL, several URI-parameters need also be specified: - cacertfile = /path/to/cacert.pem - certfile = /path/to/cert.pem - keyfile = /part/to/key.pem - verity = verify_peer - fail_if_no_peer_cert = true | false - auth_mechanism = external Example: - amqp://user:password@server_name?cacertfile=/path/to/cacert.pem& certfile=/path/to/cert.pem&keyfile=/path/to/key.pem&verify=verify_peer - amqp://server-name?cacertfile=/path/to/cacert.pem&certfile=/path/to/cert.pem& keyfile=/path/to/key.pem&verify=verify_peer&fail_if_no_peer_cert=true&auth_mechanism=external
prefetch_count (int) -- Maximum number of unacknowledged messages that may be in flight over a federation link at one time. Default: 1000
reconnect_delay (int) -- Time in seconds to wait after a network link goes down before attempting reconnection. Default: 5
ack_mode (str) -- The following values are allowed: on-confirm: Messages are acknowledged to the upstream broker after they have been confirmed downstream. Handles network errors and broker failures without losing messages. The slowest option, and the default. on-publish: Messages are acknowledged to the upstream broker after they have been published downstream. Handles network errors without losing messages, but may lose messages in the event of broker failures. no-ack: Message acknowledgements are not used. The fastest option, but you may lose messages in the event of network or broker failures.
trust_user_id (bool) -- Set True
to preserve the "user-id" field across
a federation link, even if the user-id does not match that used to republish
the message. Set to False
to clear the "user-id" field when messages
are federated. Only set this to True
if you trust the upstream broker
not to forge user-ids.
exchange (str) -- The name of the upstream exchange. Default is to use the same name as the federated exchange.
max_hops (int) -- Maximum number of federation links that messages can traverse before being dropped. Defaults to 1 if not set.
expires (int) -- Time in milliseconds that the upstream should remember
about this node for. After this time all upstream state will be removed.
Set to None
(Default) to mean "forever".
message_ttl (int) -- Time in milliseconds that undelivered messages should
be held upstream when there is a network outage or backlog.
Set to None
(default) to mean "forever".
ha_policy (str) -- Determines the "x-ha-policy"-argument for the upstream queue for a federated exchange. Default is "none" meaning the queue is not HA.
queue (str) -- The name of the upstream queue. Default is to use the same name as the federated queue.
New in version 3000.