| //// |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License |
| //// |
| |
| // This module is included in the following assemblies: |
| // |
| // configuring-address-space-message-routing.adoc |
| |
| [id='configuring-addresses-prioritized-message-delivery-{context}'] |
| = Configuring addresses for prioritized message delivery |
| |
| You can set the priority level of an address to control how {RouterName} processes messages sent to that address. Within the scope of a connection, {RouterName} attempts to process messages based on their priority. For a connection with a large volume of messages in flight, this lowers the latency for higher-priority messages. |
| |
| Assigning a high priority level to an address does not guarantee that messages sent to the address will be delivered before messages sent to lower-priority addresses. However, higher-priority messages will travel more quickly through the router network than they otherwise would. |
| |
| [NOTE] |
| ==== |
| You can also control the priority level of individual messages by setting the priority level in the message header. However, the address priority takes precedence: if you send a prioritized message to an address with a different priority level, the router will use the address priority level. |
| ==== |
| |
| .Procedure |
| |
| * In the `{RouterConfigFile}` configuration file, add or edit an address and assign a priority level. |
| + |
| -- |
| This example adds an address with the highest priority level. The router will attempt to deliver messages sent to this address before messages with lower priority levels. |
| |
| [options="nowrap",subs="+quotes"] |
| ---- |
| address { |
| prefix: my-high-priority-address |
| priority: 9 |
| ... |
| } |
| ---- |
| `priority`:: The priority level to assign to all messages sent to this address. The range of valid priority levels is 0-9, in which the higher the number, the higher the priority. The default is 4. |
| -- |
| |
| .Additional resources |
| |
| * For more information about setting the priority level in a message, see the {AmqpSpecLink}. |