---
title: "Optional features for shared and subscribed queues"
canonical: "https://docs.perspectium.com/space/Krypton/721916/Optional+features+for+shared+and+subscribed+queues"
format: markdown
---
> Macro (html-bobswift)


> Macro (anchor)



Once you have [set up a shared and subscribed queue](https://docs-perspectium.atlassian.net/wiki/display/iodine/ServiceNow+shared+and+subscribed+queues), there are various optional features you can configure and make use of.

Explore this page for these available features.


> Macro (panel)
> 
> > Macro (toc)


---


# 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:

1. <span style="color: #000000">In your sharing ServiceNow instance, go to </span>**<span style="color: #000000">Perspectium</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Perspectium Core</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Shared Queues</span>**<span style="color: #000000">.</span>
2. <span style="color: #000000">On the resulting page, find and select the shared queue that you want to configure.</span>
3. <span style="color: #000000">On the resulting shared queue form, click the </span>**<span style="color: #000000">Monitor </span>**<span style="color: #000000">box. This will reveal a variety of new monitoring fields below.</span>
4. <span style="color: #000000">In the newly revealed monitoring fields, the only requirement is to select an option from the </span>**<span style="color: #000000">Monitor Polling Interval </span>**<span style="color: #000000">dropdown. This indicates the repeated interval that the background job will run at when checking to see if the thresholds are passed.</span>
5. <span style="color: #000000">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. </span>

## <span style="color: #000000">View alerts and warnings</span>

<span style="color: #000000">Once you've set up monitoring thresholds for your queue, here's how you can view the alerts and warnings.</span>

### <span style="color: #000000">Monitor Status</span>

<span style="color: #000000">This appears at the bottom of the monitoring fields on the shared queue. It holds contents of alerts/warnings.</span>

### <span style="color: #000000">Dashboard</span>

<span style="color: #000000">You can also view the monitor status right on the DataSync homepage.</span>

### <span style="color: #000000">Alert & Notification</span>

<span style="color: #000000">You can set this up to create a log error int he Perspectium Logs (</span>**<span style="color: #000000">u_psp_log_message</span>**<span style="color: #000000">) on the instance, as well as an Alert (</span>**<span style="color: #000000">u_psp_alerts</span>**<span style="color: #000000">) on the instance. Then, you can use the </span>[<span style="color: #000000">Error Notifications</span>](https://docs-perspectium.atlassian.net/wiki/display/iodine/Error+Notifications)<span style="color: #000000"> </span><span style="color: #000000">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 = </span>**<span style="color: #000000">Perspectium Queue Monitor</span>**<span style="color: #000000">, or whichever alerts you would like notifications from. You could similarly build a custom notification record based off of the Alerts table. </span>

### <span style="color: #000000">Queue History</span>

<span style="color: #000000">Back in the queue form under the monitoring fields, check the </span><span style="color: #000000">**Track History **</span><span style="color: #000000">to track the history of the queue. Then, you can click the </span><span style="color: #000000">**View History **</span><span style="color: #000000">link under </span><span style="color: #000000">**Related Links**</span><span style="color: #000000"> to see a </span><span style="color: #000000">visualization</span><span style="color: #000000"> similar to the one below:</span>

![image](media://cf925d4f-b34b-44d7-bf5a-17c7865857c4)

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** (**<span style="color: #263238">u_psp_queue_history</span>**<span style="color: #263238">) </span>table.


[<span style="color: #000000"><u>↑ Go to top of page</u></span>](#Optionalfeaturesforsharedandsubscribedqueues-Topofpage)


---


> Macro (show-if)
> 
> # ServiceNow receipts for a fanout queue
> 
> This feature allows you to use a shared queue to send to a fanout queue, which is used to broadcast messages across multiple queues. You can find more general information on fanout queues [here](https://www.rabbitmq.com/tutorials/amqp-concepts.html#:~:targetText=A%20fanout%20exchange%20routes%20messages,the%20broadcast%20routing%20of%20messages..).
> 
> Enabling this feature will send you received based on the fanout queue. For example, if your fanout queue broadcasts messages to 3 different queues, then you'll receive one receipt per queue, for a total of 3 receipts.
> 
> 1. <span style="color: #000000">In your sharing ServiceNow instance, go to </span>**<span style="color: #000000">Perspectium</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Perspectium Core</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Shared Queues</span>**<span style="color: #000000">.</span>
> 2. <span style="color: #000000">On the resulting page, find and select the shared queue that you want to enable receipts for.</span>
> 3. Check the **Enable fanout queue receipts **box. This will reveal a **Fanout Exchange Name **field.
> 4. Enter the name—ServiceNow will use this name to reach out to the Perspectium Integration Mesh and find out how many queues and receipts to make.
> 
> ## Monitoring receipts for a fanout queue
> 
> Now that you've enabled the receipts option, here's how to monitor them:
> 
> 1. In your ServiceNow instance, go to **<span style="color: #000000">Perspectium</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Perspectium Core</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Tools </span>**<span style="color: #000000">> </span>**<span style="color: #000000">Receipts</span>**<span style="color: #000000">.</span>
> 2. <span style="color: #000000">On the resulting page, find and click the corresponding receipt for the record(s) that you send out.</span>
> 3. <span style="color: #000000">In the </span>**<span style="color: #000000">Queues</span>**<span style="color: #000000"> field at the bottom, look at the JSON object in the value. The object is set up to have the fanout queue as the field, and the value is true/false—true means that ServiceNow has received an acknowledgement for that queue and false means that it is still pending. </span>  
>   
> <span style="color: #000000">Check the fields </span>**<span style="color: #000000">Expected Ack </span>**<span style="color: #000000">and </span>**<span style="color: #000000">Current Ack </span>**<span style="color: #000000">to see if you have all the acknowledgements.</span>
> 
> 
> 
> [<span style="color: #000000"><u>↑ Go to top of page</u></span>](#Optionalfeaturesforsharedandsubscribedqueues-Topofpage)


---


# 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:

1. In your ServiceNow instance, go to **<span style="color: #000000">Perspectium</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> </span>****<span style="color: #000000">Perspectium Core</span>****<span style="color: #000000"> </span>**<span style="color: #000000">></span>**<span style="color: #000000"> Shared Queues</span>**<span style="color: #000000">.</span>
2. <span style="color: #000000">On the resulting page, find and click the queue you want to purge</span>
3. <span style="color: #000000">On the resulting queue page, under </span>**<span style="color: #000000">Related Links</span>**<span style="color: #000000">, click </span>**<span style="color: #000000">Purge Queue</span>**<span style="color: #000000">. </span>

> ℹ️ **SOME NOTES:**
> ℹ️ 
> ℹ️ - <span style="color: #172b4d">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.</span>
> ℹ️ - **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](mailto:support@perspectium.com) for assistance.
> ℹ️ - Purging queues is only supported if you have been provisioned in a vhost. Please contact [Perspectium Support](mailto:support@perspectium.com) to set this up and for more information.

[<span style="color: #000000"><u>↑ Go to top of page</u></span>](#Optionalfeaturesforsharedandsubscribedqueues-Topofpage)


---


# 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](https://docs-perspectium.atlassian.net/wiki/spaces/Krypton/pages/721183).

![image](media://cb5100d1-694b-4567-8715-9e2713cfc175)

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<br>(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:<br>**psp.out.replicator.yourqueue**<br>**psp.out.replicator.yourqueue01**<br>**psp.out.replicator.yourqueue02**<br>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:<br>**psp.out.replicator.yourqueue**<br>**psp.out.replicator.yourqueue01**<br>**psp.out.replicator.yourqueue02**<br>**psp.out.replicator.yourqueue03**<br>**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:<br>**psp.out.replicator.yourqueue**<br>**psp.out.replicator.yourqueue01**<br>**psp.out.replicator.yourqueue02**<br>**psp.out.replicator.yourqueue03**<br>**psp.out.replicator.yourqueue04**<br>**psp.out.replicator.yourqueue05**<br>**psp.out.replicator.yourqueue06**<br>**psp.out.replicator.yourqueue07**<br>**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:<br>**psp.out.replicator.yourqueue**<br>**psp.out.replicator.yourqueue01**<br>**psp.out.replicator.yourqueue02**<br>**psp.out.replicator.yourqueue03**<br>**psp.out.replicator.yourqueue04**<br>**psp.out.replicator.yourqueue05**<br>**psp.out.replicator.yourqueue06**<br>**psp.out.replicator.yourqueue07**<br>**psp.out.replicator.yourqueue08**<br>**psp.out.replicator.yourqueue09**<br>**psp.out.replicator.yourqueue10**<br>**psp.out.replicator.yourqueue11**<br>**psp.out.replicator.yourqueue12**<br>**psp.out.replicator.yourqueue13**<br>**psp.out.replicator.yourqueue14**<br>**psp.out.replicator.yourqueue15**<br>**psp.out.replicator.yourqueue16** |

:info:<span style="color: #172b4d"> </span>**<u>NOTE</u>**<span style="color: #172b4d">:</span><span style="color: #172b4d"> </span>

- <span style="color: #172b4d">Child queues can't be modified except for setting them individually active or inactive, enabling/disabling queue monitoring or updating the </span>**<span style="color: #172b4d">Team</span>**<span style="color: #172b4d"> 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 </span>**<span style="color: #172b4d">Endpoint URL</span>**<span style="color: #172b4d"> on the base queue, this will update the </span>**<span style="color: #172b4d">Endpoint URL </span>**<span style="color: #172b4d">value on all its related child queues as well.</span>
- <span style="color: #172b4d">Changing the </span>**<span style="color: #172b4d">Number of Queues </span>**<span style="color: #172b4d">option to a smaller value will delete all its related child queues beyond the new range. For example, if you change </span>**<span style="color: #172b4d">Number of Queues </span>**<span style="color: #172b4d">from </span>**<span style="color: #172b4d">8 </span>**<span style="color: #172b4d">to </span>**<span style="color: #172b4d">4</span>**<span style="color: #172b4d">, this will delete child queues </span>**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.
- <span style="color: #172b4d">Deleting the base queue will delete all the related child queues.</span>
- **<span style="color: #172b4d">Get Queue Status</span>**<span style="color: #172b4d"> works on each queue individually including child queues.</span>


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](https://docs-perspectium.atlassian.net/wiki/spaces/Krypton/pages/721907) for more information on how to split the sharing with this feature.

[<span style="color: #000000"><u>↑ Go to top of page</u></span>](#Optionalfeaturesforsharedandsubscribedqueues-Topofpage)


---


# Instance Created On

## **Instance Created On field**

---

Queues have a field referencing the instance the record was created on. This field will auto populate once a new record is created in the queues table.

This feature provides protection against cloned instances. The background job that that connect to the Perspectium's Integration Mesh for each queue will automatically check the instance created on field to see if the queue was created on a different instance.

If it was created on a different instance, for shared queues, it won't share records to that queue so as to no incorrectly share out records to MBS. For subscribed queues, it won't subscribe to any records and will also deactivate the queue in the instance so it no longer checks that queue for subscribed records.


## **Update To Current Instance UI actions**

---


### **Form View**

Users can update their queues that were cloned to be configured for the current instance using the **Update to Current Instance** UI action.

### **List View**

Users can also select multiple queues in the list view and perform the **Update Queues to Current Instance **option to update them all to the current instance.

[<span style="color: #000000"><u>↑ Go to top of page</u></span>](#Optionalfeaturesforsharedandsubscribedqueues-Topofpage)