Once you have set up a shared and subscribed queue, there are various optional features you can configure and make use of.
Explore this page for these available features.
Monitoring queues
Set up monitor thresholds
This feature allows you to define alert and warning thresholds for queue connectivity issues and backlog of records in a cue.
Here's how:
- In your sharing ServiceNow instance, go to Perspectium > Perspectium Core > Shared Queues.
- On the resulting page, find and select the shared queue that you want to configure.
On the resulting shared queue form, click the Monitor box. This will reveal a variety of new monitoring fields below.
- In the newly revealed monitoring fields, the only requirement is to select an option from the Monitor Polling Interval dropdown. This indicates the repeated interval that the background job will run at when checking to see if the thresholds are passed.
- Now, use the various threshold fields to set connection thresholds, record thresholds, or both. Connection thresholds will trigger a warning/alert if your instance cannot properly connect to the queue for the provided duration. Record thresholds will trigger a warning/alert if the number of messages in the queue pass the indicated threshold. If both warnings and alerts thresholds are passed, the system will send out only an alert.
View alerts and warnings
Once you've set up monitoring thresholds for your queue, here's how you can view the alerts and warnings.
Monitor Status
This appears at the bottom of the monitoring fields on the shared queue. It holds contents of alerts/warnings.
Dashboard
You can also view the monitor status right on the DataSync homepage.
Alert & Notification
You can set this up to create a log error int he Perspectium Logs (u_psp_log_message) on the instance, as well as an Alert (u_psp_alerts) on the instance. Then, you can use the Error Notifications module to set up a notification corresponding to this alert. You can also apply filters onto this alert table to capture only those with Name = Perspectium Queue Monitor, or whichever alerts you would like notifications from. You could similarly build a custom notification record based off of the Alerts table.
Queue History
Back in the queue form under the monitoring fields, check the Track History to track the history of the queue. Then, you can click the View History link under Related Links to see a visualization similar to the one below:
This chart will load the last 7 days of data by default. You can pull up the last 3, 7, 14, or 30 days as well using the links underneath the chart. Data by default is also deleted when it is over 35 days old. This can be changed by going to the table u_psp_properties and adjusting the value of the record with name com.perspectium.queue_history.days_retained from 35 to the number of days you would like.
Additionally, you can view the metrics of your queue in the Queue History (u_psp_queue_history) table.
Purge queue
This feature allows you to purge a queue of all messages in it. This is useful if you run a large bulk share and no longer want or need a subscriber to consume the messages.
Use this feature with caution, as messages cannot be recovered once deleted!
Here's how to purge a queue:
- In your ServiceNow instance, go to Perspectium > Perspectium Core > Shared Queues.
- On the resulting page, find and click the queue you want to purge
- On the resulting queue page, under Related Links, click Purge Queue.
SOME NOTES:
- When clicked, purge queue will attempt to connect to the endpoint URL using the queue user and password to purge the queue of all the messages it currently contains. The result of trying to purge the queue will be displayed in the status field.
- You can't purge a queue that contains over 1,000,000 (one million) records. An error message will be displayed if you try to do so. If you need to purge a queue with this many records, contact Perspectium Support for assistance.
- Purging queues is only supported if you have been provisioned in a vhost. Please contact Perspectium Support to set this up and for more information.
Number of Queues (Child Queues)
With Krypton 8.1.0+, the Number of Queues option on the Miscellaneous section allows you to specify the number of child shared queues created for sharing out data to optimize sharing.
This way you can create multiple queues to use with a bulk share without having to manually create each shared queue one by one. The queue specified in the shared queue record is considered the base shared queue while any other queues created related to this feature are considered child shared queues. All shared queues have the same capability for sharing data to using the Perspectium application as this feature is meant to simplify the shared queue creation process so you don't have to do it all manually.
This is an advanced feature for those who have heavy loads of data to share out. Use this feature with caution, as it may use more resources on your ServiceNow instance.
Using the example of creating a queue named psp.out.replicator.yourqueue as specified in the Queue name field, the option you choose will create queues as follows:
Option | Queues Created |
---|---|
1 (Default) | The default option that uses the legacy approach with one queue created i.e. psp.out.replicator.yourqueue |
2 | Two child queues in addition to the base queue. The shared queue record where you specify the Number of Queues option will be for the base queue and then two child queue records will be created. The queues will be named: psp.out.replicator.yourqueue psp.out.replicator.yourqueue01 psp.out.replicator.yourqueue02 The base queue is kept so you can a main queue to use for dynamic shares or other features where multiple queues are not needed such as using the Share only Sys IDs listed. |
4 | Similar to the option for 2, four child queues in addition to the base queue. The shared queue record where you specify the Number of Queues option will be for the base queue and then four child queue records will be created. The queues will be named: psp.out.replicator.yourqueue psp.out.replicator.yourqueue01 psp.out.replicator.yourqueue02 psp.out.replicator.yourqueue03 psp.out.replicator.yourqueue04 |
8 | Similar to the option for 2, eight child queues in addition to the base queue. The shared queue record where you specify the Number of Queues option will be for the base queue and then eight child queue records will be created. The queues will be named: psp.out.replicator.yourqueue psp.out.replicator.yourqueue01 psp.out.replicator.yourqueue02 psp.out.replicator.yourqueue03 psp.out.replicator.yourqueue04 psp.out.replicator.yourqueue05 psp.out.replicator.yourqueue06 psp.out.replicator.yourqueue07 psp.out.replicator.yourqueue08 |
16 | Similar to the option for 2, 16 child queues in addition to the base queue. The shared queue record where you specify the Number of Queues option will be for the base queue and then 16 child queue records will be created. The queues will be named: psp.out.replicator.yourqueue psp.out.replicator.yourqueue01 psp.out.replicator.yourqueue02 psp.out.replicator.yourqueue03 psp.out.replicator.yourqueue04 psp.out.replicator.yourqueue05 psp.out.replicator.yourqueue06 psp.out.replicator.yourqueue07 psp.out.replicator.yourqueue08 psp.out.replicator.yourqueue09 psp.out.replicator.yourqueue10 psp.out.replicator.yourqueue11 psp.out.replicator.yourqueue12 psp.out.replicator.yourqueue13 psp.out.replicator.yourqueue14 psp.out.replicator.yourqueue15 psp.out.replicator.yourqueue16 |
NOTE:
- Child queues can't be modified except for setting them individually active or inactive, enabling/disabling queue monitoring or updating the Team field. All other options are controlled from the base queue so the configurations are copied down to the child queues. For example, if you change the Endpoint URL on the base queue, this will update the Endpoint URL value on all its related child queues as well.
- Changing the Number of Queues option to a smaller value will delete all its related child queues beyond the new range. For example, if you change Number of Queues from 8 to 4, this will delete child queues psp.out.replicator.yourqueue05, psp.out.replicator.yourqueue06, psp.out.replicator.yourqueue07 and psp.out.replicator.yourqueue08. Changing the value to 1 will delete all child queues as 1 indicates only the base queue.
- Deleting the base queue will delete all the related child queues.
- Get Queue Status works on each queue individually including child queues.
After setting up a shared queue with child queues using this feature, you can use these queues in a bulk share to share records to multiple queues in parallel to optimize performance while avoiding data loss. See bulk share for more information on how to split the sharing with this feature.