Why queuing Mautic page hits and email opens matters during traffic spikes
When a campaign or product launch sends a burst of visitors to tracked landing pages and thousands of recipients open the same email within minutes, every page view and email open in Mautic normally triggers a write to the database. Under that load, the web requests slow down, visitors wait for pages to render, and the database becomes the bottleneck. Mautic's hit queue changes this pattern. The web request records a minimal tracking event, places it on a message transport, and returns immediately. A background consumer then picks up the event and performs the database write later. The queue absorbs the spike, and the database receives writes at a rate it can handle.
Synchronous handling is usually acceptable for a small site with steady, modest traffic, where the write cost per hit is low and the marketing team does not need hits reflected within seconds. Teams should plan the queue when tracked pages or sends are expected to produce bursts, when the database shares a server with the web tier, or when page response times rise during sends. The queue has a cost: contact activity appears in the contact timeline with a delay, and campaign decisions based on recent page visits or opens may run on slightly older data. Confirm with your marketing owners how much delay is acceptable before enabling it.
This topic covers two transports for the hit queue, RabbitMQ and Beanstalkd. Each needs a broker or service running in your infrastructure, a Mautic configuration that points to it, and a consumer process that stays running. Exact configuration keys, consumer command names and supported transport versions differ between Mautic release lines, so confirm the settings against the release you run before you copy any example. Check the current Mautic cron jobs documentation for the consumer and scheduling commands that apply to your version, and test the change in a non-production environment first.
How a page hit or email open travels through the queue
A visitor's browser or a recipient's mail client triggers a request that reaches the web server and the Mautic web application in the public tier. When hit queuing is enabled, the application hands the tracking event to a broker such as RabbitMQ or Beanstalkd instead of writing it to the database during the request. A consumer process, started by a scheduled job, reads the broker and writes the event to the Mautic database. Check that the broker and database sit inside the internal boundary and that the consumer keeps running.
Tracking events pass from the public web tier through an internal broker to the database.
Choosing between synchronous tracking, RabbitMQ and Beanstalkd
This table compares handling Mautic page hits and email opens directly, through a RabbitMQ queue, or through a Beanstalkd queue. Read each row as a question to answer for your own environment: what your team must run, what it must know, how it fails and when the option fits. Confirm supported transport versions and configuration keys in the Mautic documentation for your release line before you choose.
| Decision factor | Synchronous handling | RabbitMQ queue | Beanstalkd queue |
|---|---|---|---|
| Operational fit | No extra service. Hits are written during the web request, so the web tier and database absorb every spike directly. | Adds a broker service that your team installs, secures, patches and monitors alongside Mautic workers. | Adds a lighter job queue service that your team installs, secures, patches and monitors alongside Mautic workers. |
| Skills needed | Solid PHP-stack tuning, web server and database capacity planning. | Broker administration, queue and exchange design, and Mautic messenger transport configuration. | Queue daemon administration and Mautic messenger transport configuration, with fewer broker concepts to learn. |
| What to monitor | Web response times, database write latency, connection counts and error rates during campaign sends. | Queue depth, consumer count, unacknowledged messages, memory alarms and disk usage on the broker. | Tube depth, ready and reserved job counts, worker liveness and daemon restarts. |
| Failure behavior to test | Spikes slow page loads or time out requests, and visitor activity can be lost if the request fails before tracking completes. | Broker outage, full queue, consumer crash and redelivery after failed processing. Confirm how messages persist across broker restarts. | Daemon restart, job timeout and retry behavior, and what happens when workers stop while jobs are reserved. Confirm persistence settings for your version. |
| Suits deployments that | Have modest hit volume, a single web node and no large email sends that would stack extra writes on the database. | Already run RabbitMQ for other services, or need broker-level routing, dead-letter handling and monitoring tooling. | Want a simpler queue footprint for a single team, with workers that can be supervised by systemd or Supervisor. |
| Confirm before choosing | Peak hits per minute during your largest past send, measured in your own logs. | Supported RabbitMQ version for your Mautic release line and the exact DSN and transport keys in the Mautic docs. | Supported Beanstalkd version and transport keys for your release line, and whether your team accepts its operational footprint. |
Which background jobs to schedule alongside the hit queue
A hit queue only absorbs traffic if something drains it. Queuing page hits and email opens moves the writes out of the web request, but a consumer process still has to pick those messages up and write them to the database. The schedule for that consumer is therefore one of several background jobs, and each one touches the same contact, segment and campaign tables. Plan them as a single schedule before you turn the queue on, not as separate tasks added one at a time.
Mautic depends on cron jobs for segment updates, campaign updates and campaign triggers, and the Mautic cron jobs documentation says these should be staggered rather than run together. Segment and campaign commands read large portions of the contact table, so starting them at the same minute as a busy hit consumer is the most common way to create lock waits during a send. Also schedule the broadcasts command, which sends segment emails, and make sure a messenger consumer runs whenever emails are queued. If the messenger consumer is not running, queued email simply waits, and a send window can be missed without an obvious error.
Before go-live, write down the start time, expected run length and frequency of every job, then load test the combined schedule with realistic contact volumes. Confirm with your hosting team how many database connections and CPU cores the instance can spare for workers, and whether the hit consumer should run continuously while other jobs are staggered around it. Check the documentation for your release line, because command names and recommended intervals can change between versions. Treat any interval you copy from a blog post as a starting point to test, not a setting to keep.
How to set up the hit queue in order
This sequence moves page hit and email open tracking from direct database writes to a broker-backed queue that a supervised consumer drains on schedule. Each step ends with a check, so you can confirm the queue works before real traffic depends on it.
Confirm the release line and PHP version
Check the Mautic releases page to choose a release line that still receives support, then compare it with the requirements page for PHP, database and web server versions. For example, Mautic 7.2 supports PHP 8.2 to 8.5 with security support until 30 September 2026, while Mautic 7.0 requires MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher. The project advises against shared hosting, so confirm your app servers are a VPS or dedicated servers. Done when the PHP version on each app and worker host is supported and the release line and its end-of-support date are written down.
Provision the broker on a private segment
Your platform or infrastructure team installs the broker you have selected, such as RabbitMQ or Beanstalkd, and confirms with the Mautic documentation for your release which transports it supports. Place the broker in a network segment that only the Mautic web and worker hosts can reach, enable authentication, and create a dedicated account limited to the Mautic queue. Done when a connection from a Mautic worker host succeeds and a connection attempt from an unrelated host is refused.
Set the queue transport and credentials
In the Mautic configuration, set the messenger transport and the broker connection details, and enable the page hit queue option in the tracking settings. Confirm the exact configuration keys in the reference for your release, and keep the broker password in environment variables or a secrets store instead of version control. Clear the Mautic cache after the change. Done when the web interface loads without errors and the configuration file shows the expected transport, with the credentials masked in any output you share.
Run the consumer under a process supervisor
Start the messenger consumer command described in the Mautic cron and background job documentation for your release, and run it under Supervisor or systemd so it restarts after a failure or server reboot. Direct the output to a log file and decide how many consumer processes to run on each worker host, starting with one. Done when the supervisor reports the process as running, and the consumer reconnects to the broker after you restart it manually.
Schedule cron jobs in staggered order
Add the cron entries for segment updates, campaign updates, campaign triggers and the broadcasts command, as described in the Mautic cron jobs documentation. Stagger the start minutes so the jobs do not begin together, and run them as the same user that owns the Mautic files. Keep the log output for each job. Done when each job's log records a completed run and no two jobs start in the same minute on the same host.
Test traffic and confirm the queue drains
Load a test landing page that carries the tracking script, and open a test email from a contact record you control. Wait for the consumer to process the messages, then check that the page hit and email open appear in that contact's timeline. Watch the broker's queue depth during a short burst of test traffic, and confirm it returns to a low, steady level. Record the broker metrics you will alert on, and ask your broker administrator which queue depth threshold to use. Done when the test hits appear in the timeline and the queue returns to baseline.
Running the consumer on the web server or on a separate worker host
All components run on one host: the web server, the broker, the messenger consumer and the MySQL or MariaDB database. Page hits and email opens arrive at the same machine that handles database writes, so queued messages are processed close to where they were produced. The network path is simple and there is only one system to patch.
- Resource contention: PHP requests, the consumer, the broker and the database compete for CPU, memory and disk I/O. A traffic spike can slow the database that the consumer also writes to.
- Failure isolation: A full disk or a runaway process can take down the website, the queue and the database together.
- Deployment complexity: One inventory, one firewall policy and one Supervisor or systemd configuration. Changes are quick, but each one touches every role.
- Network paths: Broker and database connections stay local, so there is no cross-host traffic to secure or monitor.
- Backups and patching: One backup job covers the database, files and queue configuration. A kernel or PHP patch restarts every component at once, so it needs a maintenance window.
Check whether the host has headroom for a traffic peak, and confirm that you can restore the database and files into a separate environment and test them.
Web hosts serve visitors and enqueue page hits and email opens. One or more separate worker hosts run the messenger consumer, pull messages from the broker and write to the database. Worker capacity can be sized independently of the web tier, which fits instances where queue bursts are larger than the page traffic that causes them.
- Resource contention: Consumers have their own CPU and memory, so queue processing does not starve page rendering. Each tier can be sized on its own.
- Failure isolation: A stuck worker stops message processing, but visitors still load pages and messages wait in the broker. Confirm how long the broker holds messages under your configuration.
- Deployment complexity: More hosts means more drift risk. Keep the same Mautic release, PHP version and configuration file on every host, and deploy them together.
- Network paths: Workers need authenticated, firewalled connections to the broker and the database over a private network. Define and test each path, including TLS choices and DNS names.
- Backups and patching: Workers hold no unique data, so backups focus on the database and shared files. Patch workers one at a time so processing continues, and stop each worker cleanly before restarting it.
Check that every host runs the same release, and that a worker outage raises an alert before the backlog grows unnoticed.
The broker, either RabbitMQ or Beanstalkd, moves onto its own host. Web and worker hosts can then be split or combined as needed. This layout concentrates queue state in one place, which makes the broker the component to monitor, secure and possibly make highly available. The choice matters most when backlogs during spikes are large.
- Resource contention: Broker memory and disk usage grow with the backlog. Isolating the broker keeps a large backlog from pressuring the web tier.
- Failure isolation: A broker outage affects hit processing on every web and worker host, so it becomes the main point of failure. Ask the vendor and your Mautic version how enqueuing behaves while the broker is down.
- Deployment complexity: Adds a host to patch and a broker version to track alongside Mautic. Confirm that the broker version is supported by your Mautic release and transport settings.
- Network paths: Every web and worker host connects to the broker port. Restrict those connections to known source addresses, and check that clients reconnect after a brief network interruption.
- Backups and patching: Queued messages are usually transient, but confirm whether anything in flight matters to your reporting. Back up the broker configuration and plan broker restarts when the backlog is low.
Check the broker's monitoring, its access rules and the documented recovery steps for your broker version before you move it to a separate host.
Security and operational risks of a queued tracking pipeline
Moving page hits and email opens through a broker adds components that hold personal data, credentials and state. The cards below cover the decisions and checks that connect the broker, the Mautic configuration and the consumers that drain the queue.
Broker authentication and network exposure
The broker that carries hit messages should accept connections only from the Mautic web nodes and consumer hosts. Confirm that the broker port is not reachable from the internet, that anonymous or default guest access is disabled, and that each Mautic host uses its own named account with rights limited to the queues it needs. Test the connection from an untrusted network segment to confirm the block works.
Credentials stored in Mautic configuration
Broker usernames and passwords are written into the Mautic local configuration file, so anyone who can read that file can read the broker credentials. Confirm the file permissions allow only the web server and deployment user to read it, keep it out of version control and backups that leave your environment, and plan a rotation step that updates both the broker and the configuration together.
Personal data held in queued messages
Queued hit and open messages can carry contact identifiers, IP addresses, user agents and page URLs until a consumer processes them. Decide how long failed or unprocessed messages may stay in the broker, whether query strings containing email addresses or tokens are stripped before queuing, and who can read dead-letter queues. Write these rules into your records of processing so the retention period is documented.
Consumer restarts and lost messages
A consumer that crashes, is restarted during a deployment or runs out of memory can leave messages unacknowledged or drop them if the broker is not configured for durable queues. Verify that queues and messages are durable, that acknowledgement happens after processing, and that a supervisor restarts consumers automatically. Test by stopping a consumer during a burst of test hits and counting what arrives in the database.
Monitoring queue depth and consumer health
A growing queue with no running consumer looks healthy from the website, because visitors still load pages while tracking data falls behind. Set alerts on queue depth, message age and the number of active consumers, and check that the cron schedule that drives processing is still running. Agree who receives these alerts and the response time they expect.
Access to the broker management interface
Management consoles for RabbitMQ and similar brokers can purge queues, publish messages and read payloads, which makes them a route to tamper with tracking data. Restrict the management interface to a named administrator group behind your SSO or VPN, disable it on public listeners, and log administrative actions. Review who holds these rights on a fixed schedule.
What to confirm about limits before queuing Mautic tracking
Before you queue page hits and email opens, confirm the boundaries of your Mautic release line. Check the support end dates on the Mautic releases page for the version you run or plan to run. Mautic 5.2 receives security support until 30 June 2026, Mautic 6.0 until 30 September 2026, and Mautic 7.2 until 30 September 2026, with Mautic 7.3 planned as the long-term support release with security support through 31 December 2027. If your go-live date falls near an end date, plan the upgrade before the queue goes into production, not after. Then confirm the PHP and database versions against the Mautic requirements page, since the release you choose sets the supported PHP range and MySQL or MariaDB minimums that the queue host must run.
Next, confirm that your chosen broker, RabbitMQ or Beanstalkd, is supported for the exact Mautic release in use. Do not assume that a transport documented for one line works unchanged on another. Ask who owns the broker, where it runs, and how it is patched. Also decide what happens to hits that are in flight when the broker fails. Confirm with your own testing whether a hit already accepted by the web tier is persisted, retried or lost when the broker or the consumer is unavailable, and whether your web server returns an error to the visitor or silently drops the tracking request. Write this behavior down, because it determines whether your attribution and engagement reports can be trusted during an outage and whether you need to backfill or reconcile data afterward.
Finally, compare expected traffic with what the queue and consumer were sized for. Ask the marketing team for the realistic peak volume of page views and email opens, including the sends that trigger the largest bursts of opens, and ask the platform team to confirm the number of consumer processes, their memory limits and how they are restarted. Do not rely on throughput numbers from a blog post or a vendor brochure. Measure backlog growth during a controlled test that mirrors your campaign pattern, and record the point at which the queue depth starts to grow faster than it drains. If your expected peaks are unknown, treat that as a open risk to resolve before launch, not a detail to fix later.
Questions teams ask before queuing Mautic hits and opens
What drives the cost of a Mautic page hit queue setup?
The cost follows the written scope, and DeployOpen does not publish a price list, so a quote is built from what the work includes. The main drivers are the number of environments, the number of worker hosts, whether the message broker is new to your team, and how much load testing and monitoring you want. Ask for a quote that lists broker setup or review, worker service configuration, scheduling of the processing commands, load testing, documentation and handover as separate lines. Also ask which items are one-time and which recur, such as broker hosting, patching and any support retainer. Your own infrastructure costs for servers and brokers are paid to your providers, not to the partner.
How long does a Mautic queue setup take?
The duration depends mainly on how many environments, worker hosts and brokers are involved and how much load testing you require. Work usually moves through stages: confirm current traffic and hosting, choose the broker, configure the workers, schedule the commands, test at realistic volume and hand over. Mautic's cron jobs documentation says scheduled jobs should be staggered, so schedule planning adds time when several jobs share one server. Ask for the timeline in the written scope with milestones, the approvals you must give at each one and the change windows for production. No fixed duration applies to every environment, so confirm the estimate against your own setup.
What does our internal team need to provide for a queue project?
Your team needs to provide access and context before the build starts. The list usually includes server and hosting account access, the current Mautic version, PHP and database details, the web server and proxy setup, and recent figures for page views and email sends so the queue can be sized. You also need a test environment that resembles production, monitoring access, and a named owner who can approve changes and change windows. Confirm your Mautic release line before work begins, because the supported versions and their support dates are published on the Mautic releases page and differ by release.
Can our team set up the Mautic queue without outside help?
Yes, a capable team can do it, provided it has people who are comfortable running PHP applications, long-running services and a message broker, and who understand Mautic's scheduled jobs and messenger consumer. The harder parts are usually not the first install. They are load testing at realistic volume, deciding how failed messages are retried, setting up monitoring and alerts, and keeping the workers running after updates. Ask yourself who will be on call when a worker stops and who will review the configuration after each Mautic upgrade. If those skills or hours are missing, a partner can cover the gaps in a fixed-scope engagement, with deliverables agreed in writing before work starts.
Does a Mautic queue lose page hits or email opens?
A queue can lose data if it is configured poorly, so the answer depends on your configuration and tests. Messages can be lost if the broker does not persist them to disk, if a consumer acknowledges a message before processing it, or if a failed message has no retry or failure path. A well-designed setup keeps messages until they are processed, retries transient errors and moves repeated failures to a separate queue for review. Ask the implementer to show how each of these is configured, how they tested a worker crash during load, and how you would find and replay failed messages. Confirm the exact behavior against the documentation for your chosen broker and transport.
Is RabbitMQ or Beanstalkd the better fit for Mautic?
Neither is better in every case. Beanstalkd is generally simpler to run for a single workload, while RabbitMQ offers more routing options, mature management tooling and clustering features. The right choice depends on what your team already operates, how much durability and monitoring you need, how many worker hosts you plan, and where the broker will live. Ask for a written recommendation that gives the reasons, the operating tasks each option adds (backups, upgrades, alerting), and the test results that support the choice. Keep the broker you select consistent with the transport settings in your Mautic configuration, and confirm both against the Mautic documentation for your release.
Can shared hosting run the Mautic queue workers?
Shared hosting is not a suitable place for this work. The Mautic project states that Mautic should not be installed on shared hosting and recommends a VPS or dedicated server instead. Queue workers are long-running processes that must stay alive between jobs, and shared hosting plans usually do not allow the process supervision, scheduled commands at the frequency you need, or broker access that a queue requires. Check the Mautic requirements page for the supported stack before you choose a host, and ask any provider in writing whether it allows long-running processes and a message broker on your plan.
How DeployOpen scopes and delivers Mautic queue work
DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own infrastructure. For Mautic page hit and email open queuing, we start from your traffic and send patterns, agree the queue design in writing, and hand over a configuration your team can run.
How we scope
- Review expected page view and email open volumes, including campaign send peaks and bot traffic patterns.
- Confirm the queue transport choice between RabbitMQ and Beanstalkd against your existing infrastructure and operating skills.
- Agree in writing which consumer, cron and worker settings are in scope, with deliverables and timelines before work starts.
How we build
- Configure the Mautic queue transport and the messenger consumer settings for your chosen queue system.
- Schedule the Mautic queue processing commands and the surrounding cron jobs, staggered so they do not compete for resources.
- Test under representative load in a non-production environment, then confirm the backlog clears within the windows you set.
How we hand over
- Deliver a written runbook covering queue settings, process supervision, scheduled commands and the checks to run each day.
- Walk your operations team through monitoring queue depth, failed messages and worker health, with the steps for restarting workers.
- Document the configuration changes made to your Mautic, PHP and queue server files so they can be reviewed and reproduced.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainers can cover re-tuning queue workers as traffic grows, and checking queue behavior after each Mautic release.
- Confirm with DeployOpen which support level and response expectations apply before the engagement is signed.

