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

# Queue Event Processors

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

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)]" />
```
