Nav

Managing Queues

logo cloud active logo hybrid disabled logo server disabled logo pcf disabled

CloudHub includes a Queues tab in the left navigation menu where you can view and control any Virtual Machine (VM) or Staged Event-Driven Architecture (SEDA) queues within the flows of your deployed applications:

Queues are a feature that is currently only available for applications deployed to CloudHub workers. They are not available for applications that you deploy via the Runtime Manager to local servers. See Deployment Strategies for more details.

QueuesTab

CloudHub automatically detects the queues from within your flow and lists them on the Queues tab. 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, or clear all pending messages on a queue – all during runtime, without making any changes in the underlying application. You can also enable data-at-rest encryption for your persistent queues, this ensures that any shared application data written out to a persistent queue is encrypted.

Use Cases

The Queues tab is especially 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 particular message and you want to flush the messages from just that queue to resolve the issue.

Enabling Queues

To enable queues:

  1. Deploy an application to CloudHub that includes one or more VM endpoints or that includes a flow set to the queued-asynchronous processing strategy

  2. In the 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

Viewing Queues

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

CHQConsole

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 technically still on the queue until processing is complete – only then are they 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.

Clearing Queues

To clear one or more queues, click one or more checkboxes next to the queues you want to clear, and click Clear.

CHQClearQ

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

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

CHQClearInProgress

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

Encrypting 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 out to a persistent queue is encrypted, allowing you to meet your security and compliance needs.

enable+encripting

Note that if you enable encryption and then disable it, any messages that were previously encrypted remain like that and become unreadable.

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 may 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 in the console, any new messages sent to the queue during the queue clearing process may 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.