diff --git a/docs/shovel-dynamic.md b/docs/shovel-dynamic.md index 0f3e3f11b..c32e596ac 100644 --- a/docs/shovel-dynamic.md +++ b/docs/shovel-dynamic.md @@ -151,7 +151,7 @@ The body in this example includes a few keys:
amqp091 or amqp10. If omitted it will default to amqp091.
+ Either amqp091, amqp10 or local. If omitted it will default to amqp091.
See protocol specific properties below.
| Key | +Description | +
| reconnect-delay | ++ The duration (in seconds) to wait before reconnecting to the + brokers after being disconnected at either end. Default is 1. + | +
| ack-mode | +
+
+ Determines how the shovel should acknowledge consumed messages.
+ Valid values are
+ If set to
+ If set to
+ If set to |
+
| src-delete-after | +
+ + Determines when (if ever) the shovel should delete + itself. This can be useful if the shovel is being treated + as more of a move operation - i.e. being used to move + messages from one queue to another on an ad hoc basis. + +
+ The default is
+ If set to + If set to an integer, then the shovel will transfer that + number of messages before deleting itself. + + |
+
| src-prefetch-count | +
+ The maximum number of unacknowledged messages copied over a shovel at
+ any one time. Default is 1000.
+ |
+
| src-exchange | +
+
+ The exchange from which to consume. Either this
+ or
+ The shovel will declare an exclusive queue and bind it to the
+ named exchange with + If the source exchange does not exist on the source broker, it + will be not declared; the shovel will fail to start. + + |
+
| src-exchange-key | +
+ Routing key when using src-exchange.
+ |
+
| src-consumer-args | ++ Consumer arguments, such as `x-single-active-consumer` or `x-stream-offset`. + | +
| dest-exchange | +
+
+ The exchange to which messages should be published. Either this
+ or + If the destination exchange does not exist on the destination broker, + it will be not declared; the shovel will fail to start. + + |
+
| dest-exchange-key | +
+ Routing key when using dest-exchange. If this is not
+ set, the original message's routing key will be used.
+ |
+
| dest-add-forward-headers | +
+ Whether to add x-opt-shovelled headers to the
+ shovelled messages indicating where they have been shovelled
+ from and to. Default is false.
+ |
+
| dest-add-timestamp-header | +
+ Whether to add x-opt-shovelled-timestamp headers to the
+ shovelled messages containing timestamp (in seconds since epoch)
+ when message had been shovelled. Default is false.
+ |
+
| Key | +Description | +
| declarations | +
+ + An optional list of AMQP 0-9-1 operations to be executed by the Shovel + before it starts transferring messages. They are typically used to set + up the topology. + +```erlang + {declarations, [ + %% declaration list + ]} +``` ++ The declarations follow method and property names used by the RabbitMQ Erlang Client. + ++ A minimalistic declaration example: + +```erlang + {declarations, [ + 'queue.declare', + {'queue.bind', [ + {exchange, <<"my_exchange">>}, + {queue, <<>>} + ]} + ]} +``` +
+ will first declare an anonymous queue, and then bind it
+ to the exchange called
+ Each element of the declaration list is either an AMQP 0-9-1 method
+ given as single quoted atom such as
+ If just the method name is used all the
+ parameters take their defaults (as illustrated with
+ + If a tuple and property-list is supplied, then the + properties in the list specify some or all of the + parameters explicitly. + ++ Here is another example: + +```erlang +{'exchange.declare', [ + {exchange, <<"my_exchange">>}, + {type, <<"direct">>}, + durable + ]} +``` +
+ will declare a durable, direct exchange called
+ " |
+
| queue | +
+ + The name of the source queue as an Erlang binary value. This property is mandatory: + +```erlang +{queue, <<"queue.1">>} +``` + +
+
+ This queue must exist. Use the resource |
+
| prefetch-count | +
+ The maximum number of unacknowledged messages copied over a shovel at
+ any one time. Default is 1000:
+
+```erlang
+{prefetch_count, 1000}
+```
+ |
+
| Key | +Description | +
| add_timestamp_header | +
+ This boolean key controls whether a custom header, x-opt-shovelled-timestamp,
+ will be added to the message before it is re-published:
+
+```erlang
+{add_timestamp_header, true}
+```
+
+ This header value is timestamp (in seconds since epoch) when message had been shovelled.
+ By default the header is not added.
+ |
+
| add_forward_headers | +
+ When set to true the shovel will add a number of custom message headers: x-opt-shovelled-by, x-opt-shovel-type, x-opt-shovel-name,
+ to provide some additional metadata about the transfer.
+
+```erlang
+{add_forward_headers, true}
+```
+ |
+
declarations is used.
This allows anonymous queues to be declared and used.
- See also [Predeclared topology section](#predeclared-topology) below.
+ See also [Predeclared Topology section](#predeclared-topology) below.
@@ -309,7 +309,7 @@ AMQP 0-9-1-specific source keys are covered in a separate table:
-#### Predeclared topology {#predeclared-topology}
+#### Predeclared Topology {#predeclared-topology}
The `declarations` attribute is typically used to set up the topology. At the very least, it must set up the source queue.
diff --git a/versioned_docs/version-4.1/shovel-static.md b/versioned_docs/version-4.1/shovel-static.md
index 408929f73..e776915bd 100644
--- a/versioned_docs/version-4.1/shovel-static.md
+++ b/versioned_docs/version-4.1/shovel-static.md
@@ -290,7 +290,7 @@ AMQP 0-9-1-specific source keys are covered in a separate table:
most recently declared queue in declarations is used.
This allows anonymous queues to be declared and used.
- See also [Predeclared topology section](#predeclared-topology) below.
+ See also [Predeclared Topology section](#predeclared-topology) below.
@@ -309,7 +309,7 @@ AMQP 0-9-1-specific source keys are covered in a separate table:
-#### Predeclared topology {#predeclared-topology}
+#### Predeclared Topology {#predeclared-topology}
The `declarations` attribute is typically used to set up the topology. At the very least, it must set up the source queue.