---
schema_version: "1"
id: 0185be08ffc750094825c4e52a405fab933701b6ea27a79042cacfae675257d5
title: Manage Queues
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/cloudhub/managing-queues.md
canonical_url: https://docs.mulesoft.com/cloudhub/managing-queues
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8f7cc095097f53842c4928076feecea6a38b5950c99642794a7a6e33b1a9343e
description: MuleSoft Documentation Site
latest: true
---
---
product: CloudHub
---

# Manage Queues

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

You can view and control any Virtual Machine (VM) or Staged Event-Driven Architecture
([SEDA](https://en.wikipedia.org/wiki/Staged_event-driven_architecture)) queues within the flows of
your deployed applications from the **Queues** tab in Runtime Manager.

Queues are available only for applications deployed to CloudHub workers. They are not available for
applications that you deploy with the Runtime Manager to local servers. See
[Deployment Options](https://docs.mulesoft.com/runtime-manager/deployment-strategies) for more details.

![QueuesTab](/mulesoft/current/en-us/cloudhub/_images/queuestab.png)

CloudHub automatically detects the queues from within your flow and lists them on the **Queues**
tab.

Without making any changes in the underlying application, you can:

- See the number of queued and in-flight messages on each queue.

- View a snapshot of the queue throughput for the past 24 hours.

- Clear all pending messages on a queue.

You can also enable data-at-rest encryption for your persistent queues to ensure that any shared
application data written to a persistent queue is encrypted.

## Use Cases

The **Queues** tab is useful for the following use cases:

- You want runtime visibility into the queues in your application.

- You are testing your application to observe whether messages are traveling through your queues as
  expected.

- Your application is stuck processing a message and you want to flush the messages from only that
  queue to resolve the issue.

## Enable Queues

To enable queues:

1.  Deploy an application to CloudHub that includes one or more queues.

    See [VM Connector](https://docs.mulesoft.com/vm-connector/latest/).

2.  In Runtime Manager, click the application and click **Manage Application**.

3.  Click the checkbox for **Persistent queues**.

4.  If you are enabling this setting when deploying an application, click **Deploy Application**.  
    If you are updating an existing application, click **Apply Changes**.

    ![PersistentQueuesSetOnDeploy](/mulesoft/current/en-us/cloudhub/_images/persistentqueuessetondeploy.png)

When you enable persistent queues, CloudHub replaces the default Mule runtime queue manager with a
persistent one. This manager persists all queues, regardless of in-app configuration. Affected queue
types:

- VM connector queues, whether configured as persistent or not in the application

- Internal Batch component queues

- Internal SEDA queues

## View Queues

After you enable persistent queues, click **Queues** in the left navigation menu. CloudHub lists the
queues in your application in the order they appear in your application:

![CHQConsole](/mulesoft/current/en-us/cloudhub/_images/chqconsole.png)

The name of each queue is determined by the `path` attribute of the associated VM endpoint, or, in
the case of a SEDA queue, from the flow name.

- The **Queued** column shows the number of messages currently waiting on each of the queues in your
  application.

- The **In-Flight** column indicates the number of messages being processed in the flow after that
  queue.

  The in-flight messages are still on the queue until processing is complete, then they are deleted
  from the queue.

- The **Processed Messages** column shows a thumbnail graph depicting the number of messages
  processed through each queue over the past 24 hours.

The **Queued** and **In-Flight** columns update every five seconds, and the **Processed Messages**
graph updates every five minutes.

## Clear Queues

To clear one or more queues, click the checkboxes for the queues to clear, then click **Clear**.

![CHQClearQ](/mulesoft/current/en-us/cloudhub/_images/chqclearq.png)

Runtime Manager presents a warning message that confirms which queues to clear and the duration this
process takes to occur. Click **Clear Queues** to proceed.

![CHQClear](/mulesoft/current/en-us/cloudhub/_images/chqclear.png)

After you confirm, the queues that you selected display a "Clearing queue in progress" message until
the clearing process is complete:

![CHQClearInProgress](/mulesoft/current/en-us/cloudhub/_images/chqclearinprogress.png)

Clearing a queue flushes all messages waiting in the queue and all in-flight messages. After the
queue is cleared, the queue immediately begins accepting messages again.

## Encrypt Data at Rest in Persistent Queues

You can enable data-at-rest encryption for all your persistent queues. By enabling this feature, you
ensure that any shared application data written to a persistent queue is encrypted, allowing you to
meet your security and compliance needs.

![enable+encripting](/mulesoft/current/en-us/cloudhub/_images/enable-encripting.png)

> [!IMPORTANT] If you enable encryption and then disable it, any messages that were previously
> encrypted become unreadable.

## Batch Component and Persistent Queues

If your Mule application is using a Batch component and persistent queues, you might see batch
records being processed multiple times. All batch records are stored in Amazon SQS and the
visibility of the message is set to 70 seconds by default. If your batch process takes longer than
70 seconds, batch processes might see the same message again and process it multiple times.

To avoid this issue, set the `persistent.queue.min.timeout` system parameter to a larger value in
the **Properties** tab of the application **Settings** page. For example, if your batch process
takes 30 minutes to complete, set the value to `persistent.queue.min.timeout=2700000` milliseconds
(45 Minutes). The maximum value is 43000000 milliseconds (12 hours).

## Limitations

When enabling persistent queues in your application, be aware of the following:

- Persistent queues do not guarantee one-time-only message delivery. Duplicate messages might be
  sent. If one-time-only message delivery is critical for your use case, do not enable persistent
  queues.

- If you clear a queue using the **Queues** tab, any new messages sent to the queue during the queue
  clearing process might be lost.

- Enabling persistent queues has a performance implication. Putting a small message (50kb or less)
  on a queue can take 10-20 milliseconds (ms). Taking the same message off a queue can take
  70-100ms.

## See Also

- [Persistent Queues](https://docs.mulesoft.com/cloudhub/cloudhub-fabric#persistent-queues)

- [Reliability Patterns](https://docs.mulesoft.com/mule-runtime/latest/reliability-patterns)

- [Deploy to CloudHub](https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub)

- [Anypoint Studio](https://docs.mulesoft.com/studio/)

- [Deployment Options](https://docs.mulesoft.com/runtime-manager/deployment-strategies)

- [Manage Deployed Applications](https://docs.mulesoft.com/runtime-manager/managing-deployed-applications)

- [Manage Applications on CloudHub](https://docs.mulesoft.com/cloudhub/managing-applications-on-cloudhub)

- [CloudHub](https://docs.mulesoft.com/cloudhub/)

- [Develop Applications for CloudHub](https://docs.mulesoft.com/cloudhub/developing-applications-for-cloudhub)

- [CloudHub Architecture](https://docs.mulesoft.com/cloudhub/cloudhub-architecture)

- [Monitor Applications](https://docs.mulesoft.com/runtime-manager/monitoring)

- [Manage Schedules](https://docs.mulesoft.com/cloudhub/managing-schedules)

- [Manage Application Data with Object Stores](https://docs.mulesoft.com/cloudhub/managing-application-data-with-object-stores)

- [Anypoint Platform Command-Line Interface](https://docs.mulesoft.com/anypoint-cli/latest/)

- [Secure Application Properties](https://docs.mulesoft.com/cloudhub/secure-application-properties)

- [Virtual Private Cloud](https://docs.mulesoft.com/cloudhub/virtual-private-cloud)

- [Penetration Testing Policies](https://docs.mulesoft.com/cloudhub/penetration-testing-policies)
