This article explains creating and managing queues for use with Spark Messaging. You can learn more about Spark Messaging in the Developer Portal.

Accessing Spark Queue Administration

View and manage queues from Admin > Connections > Spark Queues. You must have a security profile that grants the Admin: Queues permissions to work with queues.

How to Create Spark Queues

To create a new queue:

  1. From the Spark Queues page, click Create.
  2. Enter a Label for this queue. This is the label which appears for Admins in the Vault UI.
  3. Vault automatically populates the Name field. This is the name for the queue when called from Vault Java SDK code. Only lowercase, alphanumeric characters and a single underscore (_) between characters are allowed.
  4. Select a Status for this queue. Only Active queues can accept messages.
  5. Optional: Enter a Description for this queue.
  6. Select a Queue Type. If you want this queue to send messages, select Outbound. If you want this queue to receive messages, select Inbound.
  7. If your Queue Type is Inbound, select a Spark Message Processor. These are custom Vault extensions created with the Vault Java SDK designed to process messages. You can view details about the Spark message processors available in your Vault in Admin > Connections > Spark Message Processors.
  8. If your Queue Type is Inbound, select a Spark Message Processor User. This is the user who will process messages delivered to this queue.
  9. Optional: If your Queue Type is Outbound, select a Spark Message Delivery Event Handler and Spark Message Delivery Handler User. Learn about Spark Message Delivery Event Handlers in the Developer Portal.
  10. Optional: If the messages intended for this queue must be processed sequentially, meaning one after another in the order they are received, select Sequential Message Processing. This is generally not recommended as it will cause messages to accumulate in the queue and slow down delivery.
  11. Optional: If you want this queue to continue the transaction when a message fails to enter the queue, deselect Rollback on Error. Otherwise, failure to put a message into this queue will rollback the entire transaction.
  12. Click Save.

After creating a queue, you may want to add a Queue Connection. Learn more about creating connections.

Managing Queue Connections

If your queue is attached to a connection, it will appear under the Queue Connections section on the queue’s Details page. This section shows you various details related to your queue connections, such as Connection Type, URL, and Connection Name.

From the Details page, you can Create more queue connections or View, Edit, and Delete existing connections on this queue from the Actions menu.

How to Inactivate a Spark Queue

If you want a Spark queue to stop receiving messages, you must set the queue Status to Inactive. Once inactive, a queue cannot accept any new messages.

This does not prevent a queue from processing messages which are already in the queue. For example, if an outbound queue had messages in it prior to inactivating the queue, those messages are still sent. If you want to stop sending messages already in the queue, you must disable delivery.

To inactivate a queue:

  1. In the queue Details page, click Edit.
  2. Set the Status to Inactive.
  3. Click Save.

An inactive queue will immediately stop accepting messages. If you want to re-activate this queue, you can do so with the same process. Once a queue is Active, it will start accepting messages again.

How to Disable Delivery

If you want an outbound Spark queue to stop delivering existing messages, you must disable the queue. This prevents any messages from exiting the queue, but does not prevent new messages from entering the queue. For example, an Active queue with a Delivery Status set to Disabled will still allow new messages to enter the queue, but no messages will exit the queue.

To disable a queue:

  1. Navigate to the outbound queue where you wish to disable delivery.
  2. From the Actions menu, select Disable Delivery.
  3. The queue is now disabled. In the queue details, the Delivery Status now shows as Disabled.

If you want this queue to begin delivering messages again, you can enable the queue with the same process.

This option is not available for inbound queues, as inbound queues process received messages rather than deliver messages. There is no way to stop an inbound queue from processing existing messages. If you have an inbound queue with existing messages you do not want processed, you must reset the queue.

How to Delete All Messages in a Spark Queue

Changing the Status or Delivery Status of a queue does not delete any messages in the queue. For example, an Inactive queue with a Delivery Status set to Disabled cannot send or receive messages, but any messages in the queue remain. If you no longer want these messages, you can reset the queue.

This action is permanent and cannot be undone.

To reset a queue:

  1. Navigate to the queue where you wish to reset.
  2. Click Reset Queue.
  3. After reading the warning, click Continue.
  4. When the process is complete, you will receive a green banner notification that Vault successfully reset the queue.