# Ecommerce Background Jobs and Queues

> Move non-immediate work into reliable queues, retry temporary failures and prevent the same job from changing an order twice.

- Type: Merchant guide
- Level: Intermediate
- Reading time: About 6 minutes
- Audience: Written for store owners, builders, and designers refining high-performance ecommerce stores.
- Last updated: 2026-11-04
- Canonical page: https://academy.getzenbasket.com/merchant-questions/ecommerce-background-jobs-and-queues/
- Part of: [Merchant Questions](https://academy.getzenbasket.com/merchant-questions/) on ZenBasket Academy

---

## What you need to know

### What is a background job in ecommerce?

A background job is work performed outside the customer's immediate request, such as sending email, updating search or generating an export. The store records the work and returns the customer response without waiting for every follow-up task.

### What is a message queue?

A message queue holds work messages until one or more workers can process them. It separates the rate at which the store creates tasks from the rate at which workers complete them.

### Why shouldn't every task happen during the customer's request?

Doing every task during the request makes the customer wait and lets one slow service break the whole action. Commit the essential business result first, then move suitable follow-up work to reliable background processing.

### Which ecommerce tasks should run in the background?

Email, search indexing, analytics delivery, image processing, exports and many integration updates are good background candidates. Price confirmation, stock reservation, and the order decision must remain coordinated with the customer action.

### What happens when a background job fails?

A failed job should record the error and attempt, remain visible, and either retry under policy or move to a failed-job queue for investigation. Business state must not be silently marked complete.

### Should failed background jobs be retried?

Retry a failed background job when the cause is likely temporary, such as a short service outage. Limit attempts, wait progressively longer, and send permanent or repeated failures for review.

### How do I prevent a job from being processed twice?

Give the business action a stable unique key and make processing idempotent, meaning repeating it produces no additional change after success. Record completed work atomically with the state change when possible.

### Why is my ecommerce job queue growing?

A growing queue means jobs arrive faster than workers finish them, workers are failing or paused, or one slow dependency is blocking progress. Compare queue age, arrival rate, completion rate, failures and worker capacity.

### A quick store check

Review queue age, arrival rate, processing rate, failures and duplicates for each critical background job.

---

## Frequently asked questions

### Does putting work in a queue guarantee it finishes?

No. The system still needs monitoring, retries, duplicate protection and a place for jobs that repeatedly fail.

### Should order confirmation wait for email delivery?

No. Confirm the accepted order first and send email asynchronously, so an email delay does not hold the customer request.

---

## Related learning path

- **Ecommerce Search Performance**
- **Ecommerce Timeouts Retries and Failure Handling**
- [ZenBasket Build Guide](https://help.getzenbasket.com/zenbasket-builder/)
