This article explains creating and managing queues for use with custom jobs created with the Vault Java SDK. You can learn more about the Vault Java SDK in the Developer Portal.
SDK job queues allow you to process messages (also known as tasks) in a custom queue rather than processing all messages in one System queue. This can be helpful for performance, and for enabling or disabling specific queues rather than all queues at once.
Accessing SDK Job Queue Administration
View and manage queues from Admin > Operations > SDK Job Queues. You must have a security profile that grants the Admin: SDK Job Queues permissions to work with queues.
How to Create SDK Job Queues
To create a new queue:
- From the SDK Job Queues page, click Create.
- Enter a Label for this queue. This is the label which appears for Admins in the Vault UI.
- Vault automatically populates the Name field. This is the name for the queue when called from Vault Java SDK code. If desired, you can modify this name. Only lowercase, alphanumeric characters and a single underscore (_) between characters are allowed.
- Select a Status for this queue. Only Active queues can receive messages.
- Optional: Enter a Description for this queue.
- Click Save.
After creating an SDK job queue, you may want to add it to SDK Job Metadata.
How to Inactivate an SDK Job Queue
If you want an SDK job 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 a queue had messages in it prior to inactivating the queue, those messages are still processed. If you want to stop processing the messages already in the queue, you must disable delivery.
To inactivate a queue:
- In the queue Details page, click Edit.
- Set the Status to Inactive.
- Click Save.
An inactive queue immediately stops accepting messages. If you want to re-activate a queue, you can do so with the same process. Once a queue is Active, it starts accepting messages again.
If you want an SDK job queue to stop delivering existing messages to the job processor, you must disable delivery. This 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:
- Navigate to the SDK job queue where you wish to disable delivery.
- From the All Actions menu, select Disable Delivery.
- 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 to the processor again, you can enable the queue with the same process.
How to Delete All Messages in an SDK Job 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 receive or process messages, but any messages in the queue remain. If you no longer want these messages, you can reset the queue.
Resetting a queue is permanent and cannot be undone.
To reset a queue:
- Navigate to the Details page of the SDK Job queue you wish to reset.
- Click Reset Queue.
- After reading the warning, click Continue.
- When the process is complete, you will receive a green banner notification that Vault successfully reset the queue.