Question
capgemini
IN
Last activity: 5 Dec 2024 8:23 EST
Exception handling in Queue Processor after max retry
created a queue processor and configured to retry 3 times interval of 1
and after 3 times retry it will go to broken queue items but need to handle the failure or exception handling after 3 time failed along with broken queue items , need to show to user some error message or some error message to user on UI after queue processor failed
how to handle this error message display to user.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 2 Sep 2024 8:15 EDT
Pegasystems Inc.
CA
If you're using a dedicated queue processor, then all broken items in that specific dedicated qp are related to your application.
If you're using a standard queue processor, you can filter by selecting the activity name to check the broken items for the respective activity.
We can't configure the retry option during queue-for-processing; the retry option is configured under the Queue processor rule.
Updated: 2 Sep 2024 8:15 EDT
Pegasystems Inc.
GB
@RaviG0023 To handle the failure or exception after the queue processor retries 3 times and moves the item to the broken queue, you can follow these steps to display an error message to the user on the UI:\
1. **Configure the Queue Processor**: Ensure that your queue processor is set to retry 3 times with an interval of 1 minute. This is done by setting the `MaxRetriesForQueueProcessor` property in the `SetMCOMBatchQueueConfig` data transform.
2. **Monitor the Broken Queue**: When the queue processor fails after the maximum retries, the item is moved to the broken queue. You can view the list of broken items in Admin Studio on the Queue Processor landing page. To view the list of broken items, you must have the `pzQueueProcessorObserver` privilege. To resubmit or delete items from the broken queue, you must have the `pzQueueProcessorAdministrator` privilege.
3. **Error Handling and Alerts**: Pega Platform provides error handling for queue processors, including alerts that notify you when the system detects unexpected behavior. You can set alert trigger parameters based on what you determine is normal and expected for each activity. For standard queue processing, configure the `Queue-For-Processing` parameters in the activity that queues items. For a dedicated queue processor, configure the alert parameters in the definition form of the queue processor in Dev Studio.
@RaviG0023 To handle the failure or exception after the queue processor retries 3 times and moves the item to the broken queue, you can follow these steps to display an error message to the user on the UI:\
1. **Configure the Queue Processor**: Ensure that your queue processor is set to retry 3 times with an interval of 1 minute. This is done by setting the `MaxRetriesForQueueProcessor` property in the `SetMCOMBatchQueueConfig` data transform.
2. **Monitor the Broken Queue**: When the queue processor fails after the maximum retries, the item is moved to the broken queue. You can view the list of broken items in Admin Studio on the Queue Processor landing page. To view the list of broken items, you must have the `pzQueueProcessorObserver` privilege. To resubmit or delete items from the broken queue, you must have the `pzQueueProcessorAdministrator` privilege.
3. **Error Handling and Alerts**: Pega Platform provides error handling for queue processors, including alerts that notify you when the system detects unexpected behavior. You can set alert trigger parameters based on what you determine is normal and expected for each activity. For standard queue processing, configure the `Queue-For-Processing` parameters in the activity that queues items. For a dedicated queue processor, configure the alert parameters in the definition form of the queue processor in Dev Studio.
4. **Display Error Message to User**: To display an error message to the user on the UI after the queue processor fails, you can use the following approach:\n - Create a custom activity or data transform that checks the status of the queue items. If an item is in the broken queue, set an appropriate error message in a property that is displayed on the UI.\n - Use a section or a dynamic layout in your UI to display the error message property to the user.\n - Ensure that the error message is user-friendly and provides enough information for the user to understand the issue and take necessary actions.\
By following these steps, you can effectively handle exceptions and display error messages to users when the queue processor fails after the maximum retries
Error handling in queue processing
Processing batch queue records with an error
Coforge
US
@MarijeSchillern - I am looking for a PDC event that gets triggered when there are a lot of failures during queue processing, particularly when Service-REST requests are queued to be processed. We want to avoid the System-Queue-ExecutionRequest-Service-Default from building up, and having a PDC event triggered by similar failures would help us address the issue before it consumes a lot of space on the database side.
Updated: 15 Aug 2024 4:36 EDT
Pegasystems Inc.
GB
@Imranullah-db Your response does not appear to have any bearing to the original question.
To monitor and address issues related to queue processing failures, particularly for Service-REST requests, you can utilize the PDC event OPS0042: Queue Processor in not running status.
This event is generated by the Pega Diagnostic Center (PDC) when any of the queue processors transition from the Running state to the Not Running state within the threshold time window of 1 hour.
This can help you identify and address issues before they consume a lot of space on the database side.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
If you need further help please log a New Question for this so that the original poster can mark my answer as the solution if it solves their particular scenario.
capgemini
IN
thank you for your steps and inputs.
- but if to check the broken queue iteams with activity or data transform , how to check or identify the specifi to our queue processor in the broken queue items.
- and other query how to set retry option for queue-for-processing way of queue process through activity
Accepted Solution
Updated: 2 Sep 2024 8:15 EDT
Pegasystems Inc.
CA
If you're using a dedicated queue processor, then all broken items in that specific dedicated qp are related to your application.
If you're using a standard queue processor, you can filter by selecting the activity name to check the broken items for the respective activity.
We can't configure the retry option during queue-for-processing; the retry option is configured under the Queue processor rule.
IQZ Systems
US
In Queue Processor activity context Param.pzExecutionMetadata has the details of max attempts and retrial attempts.
1.Write a function to capture the value of pzAttempts Code snippet for reference
PublicAPI api = ThreadContainer.get().getPublicAPI(); ParameterPage page= api.getParameterPage(); ClipboardPage clipboardpg = page.getPage("pzExecutionMetadata"); page.put("RetrialCount",clipboardpg.getInteger("pzAttempts"));
2.When RetrialCount > 2 try to skip the step which is making Activity-Set-Status to fail message or logic which is making to retry
In this way we can avoid case going into BrokenQ