---
schema_version: "1"
id: b6e3c1b971b8a66f348aaab6553ded17c90433712bb48e859874d7e774c10bfd
title: Queue Event Processors
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/3.6/queue-processors.md
canonical_url: https://docs.mulesoft.com/munit/3.6/queue-processors
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 799262704c0c0b4c289e73f330952a25a2fa32bc0bdaaf3aa12b185c87ae1465
description: MuleSoft Documentation Site
release: "3.6"
latest: false
---
---
product: MUnit
version: 3.6
keywords: munit, testing, unit testing, queue
---

# Queue Event Processors

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

![logo acb active](/mulesoft/current/en-us/_/img/icons/anypoint-code-builder.svg "Anypoint Code Builder")Anypoint Code
Builder

![logo studio active](/mulesoft/current/en-us/_/img/icons/studio.svg "Anypoint Studio")Anypoint Studio

The Queue event processors allow you to manage temporary queues during your test runs.

All queues are emptied as soon as the test ends.

## Queue

Adds the value to the queue. If not specified, the value is taken from the `payload`.

```xml
<munit-tools:queue>
    <munit-tools:value>#[1]</munit-tools:value>
</munit-tools:queue>
```

You can specify the queue’s name to which the value should be added. If not specified, the default
queue will be used.

```xml
<munit-tools:queue queueName="CUSTOM_QUEUE_1">
    <munit-tools:value>#[1]</munit-tools:value>
</munit-tools:queue>
```

## Dequeue

Removes the last element of the queue, if the queue is empty, it waits until an element is queued.

```xml
<munit-tools:dequeue/>
```

You can specify a timeout when waiting for an element to be queued:

```xml
<munit-tools:dequeue timeout="1000" timeoutUnit="SECONDS"/>
```

Like the queue operation, you can specify the queue’s name from which to dequeue. If not specified,
the default queue will be used.

```xml
<munit-tools:dequeue queueName="CUSTOM_QUEUE_1"/>
```

## Queue Size

Function that obtains the queue size.

```xml
<munit-tools:assert-that expression="#[MunitTools::queueSize()]" is="#[MunitTools::equalTo(2)]" />
```

Like the other operations, you can specify the queue from which to the get the size. If not
specified, the default queue will be used.

```xml
<munit-tools:assert-that expression="#[MunitTools::queueSize('CUSTOM_QUEUE_1')]" is="#[MunitTools::equalTo(2)]" />
```
