Large message exception handling in queue processing
Queue processing automatically handles large messages that exceed the Stream Service default file size threshold. Pega queue processing uses the Stream Service to queue and delegate processing. Automatic handling prevents oversize messages from breaking.
A large message could contain text for an HR email notification, for example, that runs as a background process activity. A message is the data, or input, to a queue processor. It is also referred to as a queued item.
When the Stream Service generates the RecordTooLargeException
exception
for messages larger than 5MB (the default value), Pega Platform queue
processing automatically saves the original message content in a large message storage
and replaces the message with an object reference. The message can enter the queue, but
as a small message containing only the link to the storage location where the actual
message content is kept. When the system later picks up the message for processing, but
before the queue processing activity runs, the reference resolves to the original
content.
Large message content storage
The system uses the Pega repository service (Data-Repository Pega Platform class) to store the large message content. Queue processing removes the message from the repository after it processes successfully.
If the large message storage is unavailable after making the configured number of maximum attempts, queue processing moves the item to a broken state. It removes the item from the queue and saves it to the delayed messages database. If an item was broken, queue processing purges it after 180 days.
Large message handling configuration
Pega Cloud enables the automatic large message handling feature by default. To make it available for an on-premises or client-managed cloud environment, you must enable the feature and configure a repository. For more information, see Setting up large message handling for on-premises environments.
You disable or enable the large message handling feature, change the name of the large message repository, and change the default base path in the repository by using the following dynamic system settings. For more information, see Editing a dynamic system setting.
Pega-Engine Dynamic system settings for the large exception handling feature
Purpose | Setting key | Value |
Enable the feature | queueprocessors/largemessagesnapshot/enabled | true (default) |
Disable the feature | queueprocessors/largemessagesnapshot/enabled | false |
Name of the large message repository | queueprocessors/largemessagesnapshot/repository | pegacloudfilestorage (default) or a custom string value |
Default basepath for the repository | queueprocessors/largemessagesnapshot/basepath | queueProcessors/ largeMessageSnapshots (default) or a custom string value |
Previous topic Managing queue processors Next topic Setting up large message handling for on-premises environments