Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions content/momentum/4/console-commands/reroute-queue.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lastUpdated: "03/26/2020"
lastUpdated: "05/20/2026"
title: "reroute queue"
description: "reroute queue move messages from queues of one domain to queues of the other reroute queue domain name 1 domain name 2 The reroute queue command requires two domain names as its arguments It will move messages from queues of the first domain to the queues of the second domain..."
description: "reroute queue ec_console move messages between domain queues selectively by metadata or RFC822 header match optional --meta --header filter"
---

<a name="console_commands.reroute_queue"></a>
Expand All @@ -11,7 +11,7 @@ reroute queue — move messages from queues of one domain to queues of the other

## Synopsis

`reroute queue` { *`domain_name1`* } { *`domain_name2`* }
`reroute queue` [ `--meta` *`key`* *`value`* | `--header` *`header_name`* *`header_line`* ] { *`domain_name1`* | `all` } { *`domain_name2`* }

<a name="idp12689408"></a>
## Description
Expand All @@ -21,4 +21,27 @@ The **reroute queue** command requires two domain names as its arguments.
```
10:47:35 /tmp/2025> reroute queue relay.com newrelay.com
Moved 100 messages from 'relay.com' to 'newrelay.com'
```
```

You may substitute `all` for *`domain_name1`* to move messages out of **every** source domain's queues into *`domain_name2`*.
Comment thread
deepakpn marked this conversation as resolved.

<a name="reroute_queue_selective"></a>
### Selective reroute (optional filter)

Optional **`--meta`** / **`--header`** filtering uses the same matching rules as the `fail` family of commands. **`--header`** compares **physical header lines** only — see [**folded headers**](/momentum/4/console-commands/fail-domain-quiet#header_filter_physical_lines). Place **at most one** clause immediately after `reroute queue` and **before** the source domain. With a filter, only matching messages are moved; non-matching messages stay in the source domain's queues. Without a filter, every queued message for the source domain is moved (original behavior).

You cannot combine `--meta` and `--header` in the same command.
Comment thread
dkoerichbird marked this conversation as resolved.

```
10:47:35 /tmp/2025> reroute queue --meta mo_campaign_id summer-sale relay.com newrelay.com
Moved 12 messages from 'relay.com' to 'newrelay.com'
```

```
10:47:35 /tmp/2025> reroute queue --header X-Reroute-Pick alpha all newrelay.com
Moved 4 messages from 'all' to 'newrelay.com'
```

## See Also

The same `--meta` / `--header` filtering clause is accepted by the fail-family commands: [fail domain](/momentum/4/console-commands/fail-domain) · [fail domain quiet](/momentum/4/console-commands/fail-domain-quiet) · [fail all](/momentum/4/console-commands/fail-all) · [fail all quiet](/momentum/4/console-commands/fail-all-quiet) · [binding fail domain](/momentum/4/console-commands/binding-fail-domain) · [binding fail domain quiet](/momentum/4/console-commands/binding-fail-domain-quiet)
1 change: 1 addition & 0 deletions content/momentum/changelog/5/5-3-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ This section will list all of the major changes that happened with the release o
| Feature | I-1064 | Added support for [license](/momentum/4/before-you-begin#momentum-license) signatures using ECDSA P-256 with SHA-256. |
| Feature | I-1214 | Removed `msys-nodejs` RPM from the Momentum bundle, to be replaced with the 3rd-party `nodejs` package. Node.js LTS 24+ must be installed separately from the system or a vendor repository. |
| Feature | I-1216 | Added the [log_hires_timestamp](/momentum/4/config/ref-log-hires-timestamp) option to emit microsecond-resolution timestamps in the `mainlog`, `bouncelog`, `rejectlog`, `paniclog`, custom logs, chunk logs, and message generation logs, preserving event ordering when reading multiple log files together. |
| Feature | I-1225 | Added optional `--meta` / `--header` filtering to the [`reroute queue`](/momentum/4/console-commands/reroute-queue#reroute_queue_selective) console command, to selectively move queued messages by metadata or RFC822 header match. |
| Feature | TASK-198522 | New DNS configuration options to [rate-limit MX lookups](/momentum/4/config/ref-dns-rate-limit), preventing query bursts from overwhelming the DNS infrastructure. |
| Fix | TASK-227757 | [`ha_proxy_client`](/momentum/4/modules/ha-proxy-client) now re-resolves a hostname-based `ha_proxy_server` during each health check, so backend IP changes are picked up automatically without restart. |
Loading