Message queue
When group messaging is on, a message with more recipients than the Queue Threshold is not sent at once. JoomPMS stores it in the message queue, and a Joomla scheduled task delivers it in batches. This keeps a send to hundreds of users from timing out.
Set up the task
- Go to System > Manage > Plugins, search for
joompmsand enable Task - JoomPMS Message Queue. - Go to System > Manage > Scheduled Tasks and click New.
- Choose the task type Process JoomPMS Message Queue.
- Give it a title, for example
JoomPMS queue. - Under the task options, set Batch Size: the number of recipients handled per run, from 5 to 100. The default is 20.
- Choose how often it runs, for example every 5 minutes.
- Set the status to Enabled and click Save & Close.
Joomla runs scheduled tasks with its Lazy Scheduler while people visit the site, or from a server cron job with the web cron URL or the Joomla command line. On a quiet site, use a cron job so the queue does not wait for visitors.
The JoomPMS dashboard shows a warning while group messaging is on and the plugin is missing, disabled, or has no enabled task. While no enabled task exists, users who try to send a message that would be queued get "Cannot queue message: The queue processing task is not configured." and the message is not sent.
How the queue works
- The user sends a message to more recipients than the Queue Threshold. JoomPMS saves it in the queue with the status Pending and shows "Your message to 24 recipients has been queued and will be delivered shortly."
- On each run, the task takes the oldest queue item that is Pending or Processing, marks it Processing and delivers the message to the next Batch Size recipients.
- When recipients are left, the task runs again on the next scheduler run.
- When all recipients have their copy, the item becomes Completed.
The task handles one queue item at a time, so a second group message waits until the first one is done.
The Message Queue screen
Go to Components > JoomPMS and click Message Queue in the sidebar.
| Column | Shows |
|---|---|
| ID | The queue item number. |
| Sender | The user who sent the message. |
| Subject | The subject of the message. |
| Progress | How many of the recipients have their copy. |
| Status | Pending, Processing, Completed or Failed. |
| Created | When the message was queued. |
Use the search box to find a subject, and Filter by Status to show one status.
| Button | Does |
|---|---|
| Delete | Removes the selected queue items. Copies already delivered stay in the users' inboxes. Needs the Delete permission. |
| Retry Failed | Sets the selected Failed items back to Pending, so the task tries again. Items with another status are not changed. |
An item becomes Failed when its recipient list cannot be read. The task log in System > Manage > Scheduled Tasks shows the details of each run.
Limits in 6.1.7
- Messages delivered through the queue do not appear in the sender's Outbox, and the sender name in the notification email can be wrong.
- Do not attach files to a message that will go through the queue. The recipients cannot download the file.
- When a recipient has locked their inbox, the progress count can go wrong and some recipients can get the message twice.
For a large announcement with a file, send to fewer recipients than the Queue Threshold at a time, or raise the threshold.