Parameter Name | Configuration Parameters | Parameter Description |
Name | pay-mirror-policy | Policy Name, used to identify and refer to this policy. |
Pattern | .* | The match mode of the policy uses Regular Expression Syntax. Means to match any characters. Means to match the preceding character zero or multiple times. So .* means to match the name of any queue. |
Apply to | Queues | Application object of the policy. Set to Queues indicates that the policy applies to queues. |
Priority | 0 | Priority of the policy. If a queue matches multiple policies, the policy with higher priority will be applied. 0 represents the lowest priority. |
ha-mode | exactly | Replication mode of mirrored queues. exactly: It means that the messages in the queue will be copied to a specified quantity of nodes. all: It means that the messages in the queue will be copied to all nodes. Nodes: It means performing mirroring on the specified nodes, and the node names are specified through mirroring parameters. Selecting "exactly" can reduce network and storage overhead while ensuring availability and improving performance. |
ha-params | 3 | Copy parameters of the mirrored queue. When ha-mode is set to exactly, the number of replicated nodes needs to be set here. By default, it is set to 3. Even if it is expanded to 5 nodes in the future, the performance can still remain at a relatively good level. |
ha-promote-on-failure | always | Mirror queue promotion strategy during node fault. Always means that regardless of the causes for node fault, the mirrored queue will be promoted to the main queue. When-synced means that the mirrored queue will be promoted to the main queue only when it is resynchronized after a node fault. The default setting is always to ensure service availability in any failure situation. |
ha-promote-on-shutdown | when-synced | Mirror queue promotion strategy during node normal shutdown. - always: It means that the mirrored queue will be promoted to the main queue regardless of the reasons for node shutdown. - when-synced: It indicates that the mirrored queue will be promoted to the main queue only after the node is closed and resynchronized. The default setting is when-synced to avoid unnecessary escalation operations. |
ha-sync-mode | manual | Synchronization mode of mirrored queues. - Automatic: It means that the mirrored queue is automatically synchronized with the main queue when the node starts up or reconnects to the cluster. - Manual: It indicates a requirement to manually trigger the synchronization operation to synchronize the mirrored queue with the main queue. The default setting is manual to avoid affecting cluster performance during automatic synchronization when messages accumulate. |


Parameter | Description |
Current Vhost | Indicates which Vhost is being created with an image policy. |
Policy Name | 1 - 64 characters, only digits, letters, ".", "-" and "_" are allowed. |
Match Mode | A regular expression used to match related Queues or Exchanges. For commonly used match mode regular expressions, refer to: .*: Match all queues or exchanges under this Vhost. ^test.*: Matches all Queues or Exchanges whose names start with "test" under this Vhost. .*test.*: Matches all Queues or Exchanges whose names contain "test" under this Vhost. .*test$: Matches all Queues or Exchanges whose names end with "test" under this Vhost. |
Policy type | Select Image Policy. |
Application Scope | Is used to specify the range where the current Policy takes effect. The image policy is only supported to take effect in the Queue. |
Priority | Define the priority of a policy. Optional range: [0, 255]. If multiple policies are applied to the same Queue, the Policy with the highest priority number will be effective. |

Parameter | Description |
Mirror mode | Mirror queue mode. Valid values are all, exactly, nodes. all: Means performing mirroring on all nodes in a cluster. exactly: Refers to performing mirroring on a specified number of nodes, and the number of nodes is specified by mirror parameters. Nodes: It means performing mirroring on the specified nodes, and the node names are specified through mirroring parameters. |
Mirror parameters | Mirror parameters: It means the nodes to which the message will be synchronized. When the mirror mode is set to all, this item can be left blank. When the mirror mode is set to exactly, it is recommended to select 3 for the mirror parameters. The maximum value can be equal to the current number of cluster nodes, and the minimum can be 1. When the mirror mode is set to nodes, the mirror parameters can be selected according to node names to specify which specific nodes. It is recommended to select 3 nodes. |
message synchronization method | Message synchronization method in the mirrored queue, optional automatic or manual. |
Primary node exit handling | Whether to allow an unsynced mirror to be elected as the primary node when the primary node quits gracefully. |
Primary node fault handling | When a primary node fails, whether to allow the election of an unsynced mirror as the master. To ensure availability, it is recommended to keep "allow selecting all mirrors". |

Feedback