<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Add background job processing to any Rust application in 3 lines of code. No Redis, no RabbitMQ, no external services. Just cargo add rustqueue.">
<meta property="og:title" content="Background Jobs in Rust Without Redis">
<meta property="og:description" content="Add background job processing to any Rust application in 3 lines. No Redis. No RabbitMQ. Just a library.">
<meta property="og:type" content="article">
<title>Background Jobs in Rust Without Redis | RustQueue</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Manrope:wght@400;500;700;800&family=Syne:wght@500;700;800&display=swap" rel="stylesheet">
<style>
:root {
--bg: #f4f1e8;
--surface: #fffdf8;
--ink: #11242a;
--muted: #52666d;
--line: #d5ddd9;
--accent: #0f9681;
--accent-strong: #0a6b5e;
--accent-alt: #e87337;
--accent-alt-strong: #b55321;
--shadow: 0 22px 44px rgba(17, 36, 42, 0.12);
--radius-lg: 24px;
--radius-md: 16px;
--radius-sm: 12px;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
body {
background: var(--bg);
color: var(--ink);
font-family: "Manrope", "Segoe UI", sans-serif;
line-height: 1.45;
min-height: 100vh;
overflow-x: hidden;
}
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background-image: linear-gradient(rgba(17, 36, 42, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(17, 36, 42, 0.03) 1px, transparent 1px);
background-size: 38px 38px;
mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.55), transparent 72%);
}
.scene {
position: fixed;
inset: 0;
pointer-events: none;
z-index: -1;
}
.orb {
position: absolute;
filter: blur(36px);
border-radius: 50%;
opacity: 0.8;
animation: drift 18s ease-in-out infinite;
}
.orb-a {
width: 260px;
height: 260px;
top: 4%;
left: -30px;
background: rgba(15, 150, 129, 0.3);
}
.orb-b {
width: 300px;
height: 300px;
top: 14%;
right: -60px;
background: rgba(232, 115, 55, 0.25);
animation-delay: -6s;
}
.orb-c {
width: 220px;
height: 220px;
bottom: 10%;
left: 44%;
background: rgba(15, 150, 129, 0.16);
animation-delay: -11s;
}
.container {
width: min(1120px, 92vw);
margin-inline: auto;
}
.nav-shell {
position: sticky;
top: 0;
z-index: 20;
padding-top: 1rem;
}
.nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1rem;
border: 1px solid rgba(17, 36, 42, 0.1);
background: rgba(255, 253, 248, 0.82);
backdrop-filter: blur(8px);
border-radius: 999px;
}
.logo {
display: inline-flex;
align-items: center;
gap: 0.65rem;
text-decoration: none;
color: inherit;
}
.logo-mark {
width: 16px;
height: 16px;
border-radius: 4px;
background: linear-gradient(140deg, var(--accent), var(--accent-alt));
box-shadow: 0 0 0 4px rgba(15, 150, 129, 0.15);
}
.logo-text {
font-family: "Syne", "Trebuchet MS", sans-serif;
font-size: 1.18rem;
font-weight: 800;
letter-spacing: 0.01em;
}
.nav-links {
display: inline-flex;
align-items: center;
gap: 1.1rem;
}
.nav-links a {
color: var(--muted);
text-decoration: none;
font-weight: 700;
font-size: 0.95rem;
}
.nav-links a:hover {
color: var(--ink);
}
.btn {
border-radius: 999px;
padding: 0.7rem 1.15rem;
text-decoration: none;
font-weight: 800;
letter-spacing: 0.01em;
transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn-primary {
color: #f8fffd;
background: linear-gradient(120deg, var(--accent), var(--accent-alt));
box-shadow: 0 12px 24px rgba(17, 36, 42, 0.18);
}
.btn-primary:hover {
transform: translateY(-1px);
box-shadow: 0 16px 28px rgba(17, 36, 42, 0.22);
}
.btn-ghost {
color: var(--ink);
background: rgba(255, 253, 248, 0.9);
border: 1px solid rgba(17, 36, 42, 0.12);
}
.btn-ghost:hover {
transform: translateY(-1px);
border-color: rgba(17, 36, 42, 0.3);
}
.hero {
margin-top: 3.2rem;
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 2rem;
align-items: start;
}
.eyebrow {
margin: 0 0 0.65rem;
font-size: 0.76rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.18em;
color: var(--accent-strong);
}
.hero h1,
.section-head h2,
.launch h2 {
margin: 0;
font-family: "Syne", "Trebuchet MS", sans-serif;
line-height: 1;
}
.hero h1 {
font-size: clamp(2.4rem, 6vw, 4.7rem);
max-width: 12ch;
}
.hero h1 span {
color: var(--accent-alt-strong);
}
.lead {
margin: 1rem 0 0;
color: var(--muted);
font-size: clamp(1rem, 1.9vw, 1.2rem);
max-width: 58ch;
}
.hero-cta {
margin-top: 1.35rem;
display: flex;
flex-wrap: wrap;
gap: 0.7rem;
}
.command-block {
margin-top: 1.4rem;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius-sm);
padding: 0.9rem 1rem;
box-shadow: 0 6px 14px rgba(17, 36, 42, 0.05);
}
.mono {
font-family: "JetBrains Mono", "Consolas", monospace;
}
.mono-label {
display: block;
color: var(--muted);
font-size: 0.78rem;
margin-bottom: 0.4rem;
}
.signal-list {
margin: 1rem 0 0;
padding: 0;
list-style: none;
display: grid;
gap: 0.35rem;
color: var(--muted);
}
.signal-list li::before {
content: "●";
color: var(--accent);
margin-right: 0.5rem;
font-size: 0.8rem;
}
.hero-side {
display: grid;
gap: 1rem;
}
.panel {
border-radius: var(--radius-md);
border: 1px solid var(--line);
background: var(--surface);
padding: 1rem;
box-shadow: var(--shadow);
}
.panel h2 {
margin: 0 0 0.8rem;
font-size: 0.96rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--muted);
}
.kpis {
display: grid;
gap: 0.7rem;
}
.kpis div {
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(15, 150, 129, 0.08);
padding: 0.55rem 0.7rem;
border-radius: 10px;
}
.kpis strong {
font-size: 1.15rem;
}
.panel-events ul {
margin: 0;
padding: 0;
list-style: none;
display: grid;
gap: 0.5rem;
}
.panel-events li {
display: flex;
align-items: center;
gap: 0.55rem;
font-size: 0.9rem;
color: var(--muted);
}
.panel-events small {
margin-left: auto;
opacity: 0.85;
}
.dot {
width: 8px;
height: 8px;
border-radius: 999px;
}
.dot.ok {
background: #17a371;
}
.dot.warn {
background: #d96a2f;
}
.features,
.use-cases,
.launch {
margin-top: 5.8rem;
}
.section-head h2 {
margin-top: 0.25rem;
font-size: clamp(1.8rem, 3.2vw, 2.7rem);
max-width: 18ch;
}
.feature-grid {
margin-top: 1.4rem;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 0.9rem;
}
.card {
border-radius: var(--radius-md);
border: 1px solid var(--line);
padding: 1rem;
background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(247, 243, 236, 0.85));
transition: transform 180ms ease, border-color 180ms ease;
}
.card:hover {
transform: translateY(-4px);
border-color: rgba(15, 150, 129, 0.5);
}
.card h3 {
margin: 0;
font-family: "Syne", "Trebuchet MS", sans-serif;
font-size: 1.2rem;
}
.card p {
margin: 0.6rem 0 0;
color: var(--muted);
}
.lane {
margin-top: 1.4rem;
display: grid;
gap: 0.8rem;
}
.lane-item {
border-radius: var(--radius-md);
border: 1px solid var(--line);
background: rgba(255, 253, 248, 0.9);
padding: 1rem 1rem 1rem 1.2rem;
position: relative;
}
.lane-item::before {
content: "";
position: absolute;
left: 0;
top: 16px;
bottom: 16px;
width: 4px;
border-radius: 999px;
background: linear-gradient(180deg, var(--accent), var(--accent-alt));
}
.lane-item h3 {
margin: 0;
font-family: "Syne", "Trebuchet MS", sans-serif;
}
.lane-item p {
margin: 0.45rem 0 0;
color: var(--muted);
}
.launch {
border-radius: var(--radius-lg);
background: linear-gradient(155deg, #102b33, #0e4038);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #e6fffa;
padding: 1.6rem;
}
.launch .eyebrow {
color: #86f3d8;
}
.launch h2 {
max-width: 16ch;
font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}
.code {
margin: 1rem 0 0;
border-radius: var(--radius-sm);
border: 1px solid rgba(255, 255, 255, 0.2);
background: rgba(6, 20, 24, 0.65);
padding: 1rem;
overflow-x: auto;
}
.code code {
margin: 0;
font-family: "JetBrains Mono", "Consolas", monospace;
color: #d0fff1;
font-size: 0.86rem;
line-height: 1.55;
}
.launch-actions {
margin-top: 1.1rem;
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.footer {
margin: 3.4rem auto 1.9rem;
border-top: 1px solid var(--line);
padding-top: 1rem;
display: flex;
justify-content: space-between;
gap: 1rem;
color: var(--muted);
font-size: 0.9rem;
}
.reveal {
opacity: 0;
transform: translateY(20px);
animation: reveal 860ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-copy.reveal {
animation-delay: 90ms;
}
.panel-queue.reveal {
animation-delay: 230ms;
}
.panel-events.reveal {
animation-delay: 360ms;
}
.feature-grid .card:nth-child(1) { animation-delay: 100ms; }
.feature-grid .card:nth-child(2) { animation-delay: 180ms; }
.feature-grid .card:nth-child(3) { animation-delay: 260ms; }
.feature-grid .card:nth-child(4) { animation-delay: 340ms; }
.feature-grid .card:nth-child(5) { animation-delay: 420ms; }
.feature-grid .card:nth-child(6) { animation-delay: 500ms; }
.feature-grid .card:nth-child(7) { animation-delay: 580ms; }
.feature-grid .card:nth-child(8) { animation-delay: 660ms; }
.feature-grid .card:nth-child(9) { animation-delay: 740ms; }
.lane .lane-item:nth-child(1) { animation-delay: 120ms; }
.lane .lane-item:nth-child(2) { animation-delay: 220ms; }
.lane .lane-item:nth-child(3) { animation-delay: 320ms; }
.lane .lane-item:nth-child(4) { animation-delay: 420ms; }
@keyframes reveal {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes drift {
0%, 100% {
transform: translate3d(0, 0, 0) scale(1);
}
50% {
transform: translate3d(0, -14px, 0) scale(1.06);
}
}
@media (max-width: 980px) {
.nav {
border-radius: 18px;
flex-wrap: wrap;
}
.nav-links {
width: 100%;
order: 3;
justify-content: flex-start;
overflow-x: auto;
padding-top: 0.2rem;
}
.hero {
grid-template-columns: 1fr;
}
.feature-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 640px) {
.container {
width: min(1120px, 94vw);
}
.hero {
margin-top: 2.2rem;
}
.feature-grid {
grid-template-columns: 1fr;
}
.hero h1 {
font-size: clamp(2.1rem, 10vw, 2.9rem);
}
.section-head h2,
.launch h2 {
font-size: clamp(1.6rem, 9vw, 2.1rem);
}
.footer {
flex-direction: column;
}
}
.hero-code {
margin: 2rem 0;
background: var(--ink);
border-radius: var(--radius-sm);
padding: 1.5rem 2rem;
overflow-x: auto;
}
.hero-code pre {
margin: 0;
}
.hero-code code {
font-family: "JetBrains Mono", monospace;
font-size: 0.95rem;
line-height: 1.7;
color: #e2e8f0;
}
.hero-code .kw { color: #c792ea; }
.hero-code .str { color: #c3e88d; }
.hero-code .comment { color: #637777; font-style: italic; }
.how-it-works {
padding: 6rem 0;
}
.growth-path {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-top: 3rem;
}
.growth-step {
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius-md);
padding: 2rem;
}
.step-num {
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background: var(--accent);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 1.1rem;
margin-bottom: 1rem;
}
.code-sm {
background: var(--ink);
border-radius: var(--radius-sm);
padding: 1rem 1.25rem;
overflow-x: auto;
margin-top: 1rem;
}
.code-sm code {
font-family: "JetBrains Mono", monospace;
font-size: 0.85rem;
line-height: 1.6;
color: #e2e8f0;
}
.compare-list {
list-style: none;
padding: 0;
margin: 0;
}
.compare-list li {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
border-bottom: 1px solid var(--line);
font-size: 0.9rem;
}
.compare-list li:last-child {
border-bottom: none;
}
.compare-list .muted {
color: var(--muted);
}
.compare-list code {
font-family: "JetBrains Mono", monospace;
font-size: 0.8rem;
color: var(--muted);
}
</style>
<style>
.blog-header { margin-top: 2rem; margin-bottom: 3rem; }
.blog-header h1 {
font-family: "Syne", "Trebuchet MS", sans-serif;
font-size: clamp(2rem, 5vw, 3.2rem);
line-height: 1.1;
max-width: 20ch;
}
.blog-meta {
margin-top: 0.75rem;
color: var(--muted);
font-size: 0.9rem;
}
.blog-body { max-width: 72ch; }
.blog-body h2 {
font-family: "Syne", "Trebuchet MS", sans-serif;
font-size: 1.6rem;
margin: 2.5rem 0 0.75rem;
line-height: 1.15;
}
.blog-body h3 {
font-family: "Syne", "Trebuchet MS", sans-serif;
font-size: 1.2rem;
margin: 2rem 0 0.5rem;
}
.blog-body p { color: var(--muted); margin: 0.75rem 0; font-size: 1.05rem; line-height: 1.7; }
.blog-body p strong { color: var(--ink); }
.blog-body blockquote {
border-left: 4px solid var(--accent);
margin: 1.5rem 0;
padding: 0.75rem 1.25rem;
background: rgba(15, 150, 129, 0.06);
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.blog-body blockquote p { font-style: italic; margin: 0; }
.blog-code {
background: var(--ink);
border-radius: var(--radius-sm);
padding: 1.25rem 1.5rem;
overflow-x: auto;
margin: 1.25rem 0;
}
.blog-code pre { margin: 0; }
.blog-code code {
font-family: "JetBrains Mono", monospace;
font-size: 0.88rem;
line-height: 1.65;
color: #e2e8f0;
}
.blog-code .kw { color: #c792ea; }
.blog-code .str { color: #c3e88d; }
.blog-code .cm { color: #637777; font-style: italic; }
.blog-code .fn { color: #82aaff; }
.blog-code .mac { color: #89ddff; }
.blog-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.92rem; }
.blog-table th, .blog-table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; }
.blog-table th { font-weight: 700; color: var(--ink); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-table td { color: var(--muted); }
.blog-table td strong { color: var(--ink); }
.blog-cta {
margin: 3rem 0 2rem;
padding: 2rem;
border-radius: var(--radius-lg);
background: linear-gradient(155deg, #102b33, #0e4038);
color: #e6fffa;
border: 1px solid rgba(255,255,255,0.2);
}
.blog-cta h2 { color: #e6fffa; margin: 0 0 0.5rem; font-family: "Syne", sans-serif; font-size: 1.6rem; }
.blog-cta p { color: #86f3d8; margin: 0 0 1rem; }
.blog-cta code { font-family: "JetBrains Mono", monospace; background: rgba(6,20,24,0.65); padding: 0.6rem 1rem; border-radius: var(--radius-sm); display: block; color: #d0fff1; font-size: 0.88rem; border: 1px solid rgba(255,255,255,0.15); }
</style>
</head>
<body>
<div class="scene" aria-hidden="true">
<div class="orb orb-a"></div>
<div class="orb orb-b"></div>
<div class="orb orb-c"></div>
</div>
<header class="nav-shell">
<nav class="container nav">
<a href="/rustqueue/" class="logo" aria-label="RustQueue home">
<span class="logo-mark"></span>
<span class="logo-text">RustQueue</span>
</a>
<div class="nav-links">
<a href="/rustqueue/">Home</a>
<a href="/rustqueue/blog/background-jobs-without-redis.html">Blog</a>
<a href="https://github.com/ferax564/rustqueue">GitHub</a>
</div>
<a class="btn btn-ghost" href="https://github.com/ferax564/rustqueue">Open Dashboard</a>
</nav>
</header>
<main class="container">
<article class="blog-header">
<p class="eyebrow">Launch Post</p>
<h1>Background Jobs in Rust Without Redis</h1>
<p class="blog-meta">March 29, 2026 · RustQueue v0.2.0</p>
</article>
<div class="blog-body">
<p><strong>What if adding background jobs to your Rust app was as simple as adding SQLite?</strong></p>
<p>Every Rust web application eventually needs background job processing. Send welcome emails. Generate reports. Process uploads. Retry failed API calls. And the standard answer is always the same: install Redis, set up a queue library, run a separate worker process, configure monitoring, add Redis to your Docker Compose, your CI, your staging environment, your production...</p>
<p>For most applications, that's overkill. You don't need a distributed message broker. You need a way to run tasks in the background that won't be lost if your process crashes.</p>
<p>Today we're releasing <strong>RustQueue v0.2.0</strong> — and it does exactly that.</p>
<h2>Three Lines of Code</h2>
<div class="blog-code"><pre><code><span class="kw">let</span> rq = RustQueue::redb(<span class="str">"./jobs.db"</span>)?.build()?;
rq.push(<span class="str">"emails"</span>, <span class="str">"send-welcome"</span>, <span class="mac">json!</span>({<span class="str">"to"</span>: <span class="str">"user@a.com"</span>}), None).<span class="kw">await</span>?;
<span class="cm">// That's it. The job is persisted to disk. It survives crashes.</span></code></pre></div>
<p>No Redis. No RabbitMQ. No Docker. No config file. No separate process. Just <code>cargo add rustqueue</code> and you have a persistent, crash-safe job queue embedded in your application.</p>
<p>The job is written to an embedded ACID database (redb). If your process crashes mid-flight, the job is still there when you restart. Retries, exponential backoff, and a dead-letter queue are built in.</p>
<h2>The Full Example</h2>
<div class="blog-code"><pre><code><span class="kw">use</span> rustqueue::RustQueue;
<span class="kw">use</span> serde_json::<span class="mac">json!</span>;
#[tokio::main]
<span class="kw">async fn</span> <span class="fn">main</span>() -> anyhow::Result<()> {
<span class="kw">let</span> rq = RustQueue::redb(<span class="str">"./jobs.db"</span>)?.build()?;
<span class="cm">// Push a job</span>
<span class="kw">let</span> id = rq.push(<span class="str">"emails"</span>, <span class="str">"send-welcome"</span>,
<span class="mac">json!</span>({<span class="str">"to"</span>: <span class="str">"user@example.com"</span>}), None).<span class="kw">await</span>?;
println!(<span class="str">"Queued: {id}"</span>);
<span class="cm">// Pull and process</span>
<span class="kw">let</span> jobs = rq.pull(<span class="str">"emails"</span>, 1).<span class="kw">await</span>?;
println!(<span class="str">"Processing: {}"</span>, jobs[0].name);
rq.ack(jobs[0].id, None).<span class="kw">await</span>?;
Ok(())
}</code></pre></div>
<p>Run it with <code>cargo run</code>. That's your first background job — processed, acknowledged, done. The <code>jobs.db</code> file persists everything. Kill the process, restart it, and your pending jobs are still there.</p>
<h2>Adding Background Jobs to an Existing Axum App</h2>
<p>Most Rust web apps are built on Axum. RustQueue v0.2.0 ships with a native Axum integration — the <code>RqState</code> extractor. Here's what it looks like to add background email processing to an existing web application:</p>
<div class="blog-code"><pre><code><span class="kw">use</span> axum::routing::post;
<span class="kw">use</span> axum::{Json, Router};
<span class="kw">use</span> rustqueue::axum_integration::RqState;
<span class="kw">use</span> rustqueue::RustQueue;
<span class="kw">use</span> serde_json::<span class="mac">json!</span>;
<span class="kw">use</span> std::sync::Arc;
<span class="kw">async fn</span> <span class="fn">enqueue_email</span>(rq: RqState, Json(body): Json<serde_json::Value>)
-> Json<serde_json::Value>
{
<span class="kw">let</span> to = body[<span class="str">"to"</span>].as_str().unwrap_or(<span class="str">"unknown"</span>);
<span class="kw">let</span> id = rq.push(<span class="str">"emails"</span>, <span class="str">"send-welcome"</span>,
<span class="mac">json!</span>({<span class="str">"to"</span>: to}), None).<span class="kw">await</span>.unwrap();
Json(<span class="mac">json!</span>({<span class="str">"queued"</span>: true, <span class="str">"job_id"</span>: id.to_string()}))
}
#[tokio::main]
<span class="kw">async fn</span> <span class="fn">main</span>() -> anyhow::Result<()> {
<span class="kw">let</span> rq = Arc::new(RustQueue::redb(<span class="str">"./jobs.db"</span>)?.build()?);
<span class="kw">let</span> app = Router::new()
.route(<span class="str">"/send-email"</span>, post(enqueue_email))
.with_state(rq);
<span class="kw">let</span> listener = tokio::net::TcpListener::bind(<span class="str">"0.0.0.0:3000"</span>).<span class="kw">await</span>?;
axum::serve(listener, app).<span class="kw">await</span>?;
Ok(())
}</code></pre></div>
<p>The <code>RqState</code> extractor handles everything. Add it as a handler parameter and call <code>.push()</code>, <code>.pull()</code>, <code>.ack()</code> directly. No setup, no wiring, no boilerplate.</p>
<h2>Why Not Just Use Redis?</h2>
<table class="blog-table">
<thead>
<tr><th></th><th>RustQueue</th><th>Redis + BullMQ</th><th>RabbitMQ</th><th>Celery</th></tr>
</thead>
<tbody>
<tr><td>External deps</td><td><strong>None</strong></td><td>Redis server</td><td>Erlang + RabbitMQ</td><td>Redis/RabbitMQ</td></tr>
<tr><td>Time to first job</td><td><strong>~60 seconds</strong></td><td>15–30 min</td><td>15–30 min</td><td>15–30 min</td></tr>
<tr><td>Deployment</td><td><strong>cargo add</strong></td><td>2+ services</td><td>2+ services</td><td>3+ services</td></tr>
<tr><td>Binary / footprint</td><td><strong>6.8 MB, 15 MB RAM</strong></td><td>N/A, ~100 MB+</td><td>N/A, ~100 MB+</td><td>N/A, ~200 MB+</td></tr>
<tr><td>Crash recovery</td><td><strong>ACID</strong></td><td>Configurable</td><td>Yes</td><td>Depends</td></tr>
</tbody>
</table>
<p>Redis is a fantastic tool. But running an entire Redis server just for background jobs is like renting a warehouse to store your grocery list. For most applications, an embedded queue that lives inside your process is the right abstraction.</p>
<h2>Start Embedded. Grow Into a Server.</h2>
<p>The best part: you're never locked in. When your application outgrows embedded mode, run the same engine as a standalone server — same data file, same guarantees, zero migration:</p>
<div class="blog-code"><pre><code><span class="cm"># Day 1: embedded in your app</span>
<span class="kw">let</span> rq = RustQueue::redb(<span class="str">"./jobs.db"</span>)?.build()?;
<span class="cm"># Day 30: standalone server, same data</span>
$ rustqueue serve --storage ./jobs.db
<span class="cm"># Day 60: workers in any language</span>
<span class="kw">const</span> rq = <span class="kw">new</span> RustQueueClient(<span class="str">"http://localhost:6790"</span>);
<span class="kw">await</span> rq.push(<span class="str">"emails"</span>, <span class="str">"welcome"</span>, { to: <span class="str">"user@a.com"</span> });</code></pre></div>
<p>Client SDKs for Node.js, Python, and Go are included — all zero-dependency. REST API, TCP protocol, WebSocket events, web dashboard, Prometheus metrics, Grafana dashboards — everything is built in.</p>
<h2>Performance</h2>
<p>Because we know you'll ask:</p>
<table class="blog-table">
<thead>
<tr><th>System</th><th>Produce</th><th>Consume</th><th>End-to-end</th></tr>
</thead>
<tbody>
<tr><td><strong>RustQueue TCP</strong></td><td><strong>47,129/s</strong></td><td><strong>38,048/s</strong></td><td><strong>22,685/s</strong></td></tr>
<tr><td>RabbitMQ</td><td>47,588/s</td><td>5,367/s</td><td>4,686/s</td></tr>
<tr><td>Redis</td><td>9,337/s</td><td>9,511/s</td><td>4,951/s</td></tr>
<tr><td>BullMQ</td><td>7,559/s</td><td>6,690/s</td><td>1,978/s</td></tr>
<tr><td>Celery</td><td>3,168/s</td><td>1,589/s</td><td>893/s</td></tr>
</tbody>
</table>
<p>Neck-and-neck with RabbitMQ on produce. <strong>7.1x faster on consume. 4.8x faster end-to-end.</strong> With a 6.8 MB binary using 15 MB of RAM.</p>
<p>But performance isn't the point. The point is that you shouldn't need to think about your job queue. It should be invisible infrastructure — like SQLite is for databases.</p>
<blockquote>
<p>Think of RustQueue not as a replacement for RabbitMQ, but as a replacement for tokio::spawn.</p>
</blockquote>
<h2>Production Features</h2>
<p>This isn't a toy. RustQueue ships with everything you need for production:</p>
<p><strong>Retries & backoff</strong> — fixed, linear, or exponential. Jobs that exhaust retries land in a dead-letter queue for inspection.</p>
<p><strong>Cron & interval scheduling</strong> — built-in schedule engine with pause/resume.</p>
<p><strong>DAG workflows</strong> — job dependencies with cycle detection and cascade failure.</p>
<p><strong>Progress tracking</strong> — 0–100 progress with log messages and worker heartbeats.</p>
<p><strong>Webhooks</strong> — HMAC-SHA256 signed HTTP callbacks on job events.</p>
<p><strong>Observability</strong> — 15+ Prometheus metrics, pre-built Grafana dashboard, WebSocket event stream.</p>
<h2>Get Started</h2>
<div class="blog-cta">
<h2>Your First Background Job in 60 Seconds</h2>
<p>Add RustQueue to your project and push your first job:</p>
<code>cargo add rustqueue tokio serde_json anyhow</code>
</div>
<p>Then check out the <a href="https://github.com/ferax564/rustqueue/tree/main/examples" style="color: var(--accent-strong); font-weight: 700;">examples</a>: basic push/pull/ack, persistent queues, worker loops, and a full Axum web app with background jobs.</p>
<p>Star us on <a href="https://github.com/ferax564/rustqueue" style="color: var(--accent-strong); font-weight: 700;">GitHub</a>. We'd love to hear what you build.</p>
</div>
</article>
</main>
<footer class="footer container">
<p>RustQueue · Background jobs without infrastructure</p>
<p class="mono">MIT OR Apache-2.0</p>
</footer>
</body>
</html>