Enqueue Mediator
Note
Please note that this feature is deprecated.
The Enqueue mediator uses a priority executor to handle messages. Priority executors are used in high-load scenarios when you want to execute different sequences for messages with different priorities. This approach allows you to control the resources allocated to executing sequences and to prevent high-priority messages from getting delayed and dropped. For example, if there are two priorities with value 10 and 1, messages with priority 10 will get 10 times more resources than messages with priority 1.
The Enqueue mediator is a content-unaware mediator.
Syntax
<enqueue xmlns="http://ws.apache.org/ns/synapse" executor="[Priority Executor Name]" priority="[Priority]" sequence="[Sequence Name]"> </enqueue>
Configuration
The parameters available to configure the Enqueue mediator are as follows.
Parameter Name | Description |
---|---|
Executor | The priority executor that should be used to process the messages. |
Priority | The priority of messages that this mediator will handle. This priority level should also be defined in the priority executor. |
Sequence | The sequence that should be used to process messages with the specified priority. This sequence should be saved in the registry before it can be selected here. Click either Configuration Registry or the Governance Registry to select the required sequence from the resource tree. |
Example
In this example, two Enqueue mediator configurations use the priority executor One
based on which requests are prioritized. A sequence named Send
applies to requests with priority 2
, and a sequence named LogSend
applies to priority 1
.
<inSequence xmlns="http://ws.apache.org/ns/synapse"> <enqueue executor="One" priority="2" sequence="conf:/Send"></enqueue> <enqueue executor="One" priority="1" sequence="conf:/LogSend"></enqueue> </inSequence>
Samples
For another example, see Sample 652: Priority Based Message Mediation.