This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Enqueue Mediator

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.



Syntax

<enqueue xmlns="http://ws.apache.org/ns/synapse" 
	executor="[Priority Executor Name]" priority="[Priority]" sequence="[Sequence Name]">
</enqueue>

 


UI Configuration

When you add the Enqueue mediator to your sequence, the following screen appears:

Enqueue Mediator Attributes:

  • executor - The priority executor to use 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 to use to process messages with the specified priority.

Example

For an example of priority-based mediation, see Sample 652: Priority Based Message Mediation.