<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au" -->

---
title: How to add background jobs with real-time updates to a...
description: A step-by-step tutorial shows how to build background jobs with real-time progress updates in a Next.js application using Inngest. Using a sample project...
canonical: https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to add background jobs with real-time updates to a Next.js application | daily.dev
og:description: A step-by-step tutorial shows how to build background jobs with real-time progress updates in a Next.js application using Inngest. Using a sample project...
og:url: https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au
og:image: https://api.daily.dev/og/posts/vwpgPP3AU.png
og:image:alt: How to add background jobs with real-time updates to a Next.js application
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to add background jobs with real-time updates to a Next.js application

**[Inngest Blog](https://daily.dev/sources/inngest)** · 15 min read · 0 upvotes · 0 comments

## Summary

A step-by-step tutorial shows how to build background jobs with real-time progress updates in a Next.js application using Inngest. Using a sample project called CampaignCraft (which imports contacts via CSV and sends AI-personalized email campaigns), the guide covers setting up Inngest functions, triggering jobs from API routes, streaming live progress via Inngest's Realtime API and channels/topics, and subscribing to updates from React components with the useInngestSubscription hook. It closes with an FAQ on concurrency limits, retries, and handling dropped connections.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/background-jobs-realtime-nextjs>

## Questions this post answers

### How can I limit the number of concurrent runs for a background job in Inngest?

You configure the concurrency option when defining the Inngest function, for example concurrency: 2 caps a job to two simultaneous runs. This is set directly on the createFunction call alongside the job id, letting you throttle resource-intensive background jobs like contact imports or campaign sends.

_daily.dev surfaces practical guidance like this for developers tuning background job throughput._

### How do I resume a dropped connection when subscribing to Inngest Realtime updates in React?

The useInngestSubscription() hook from @inngest/realtime automatically resumes any lost connection without extra code. If the connection is permanently lost, that state is reflected in the error and state properties returned by the hook, with state becoming closed, so the UI can react accordingly.

_Developers building resilient real-time features can track patterns like this via daily.dev._

### How do I subscribe to multiple topics or channels with Inngest Realtime in a Next.js app?

To subscribe to multiple topics on one channel, list them in the topics array passed to getSubscriptionToken(), such as topics: ["topic1", "topic2", "topic3"]. To subscribe to multiple channels, create a separate subscription token for each channel and call useInngestSubscription() once per channel.

_daily.dev helps developers wiring up multi-channel real-time subscriptions keep up with patterns like this._

## Similar posts on daily.dev

- [Automating Complex Workflow in Your Next.js App with Inngest](https://daily.dev/posts/automating-complex-workflow-in-your-next-js-app-with-inngest-z21aksfdw) · Telerik · 2 upvotes · 0 comments
- [Background Jobs For Indie Developers: 2026 Setup Guide](https://daily.dev/posts/background-jobs-for-indie-developers-2026-setup-guide-aqnyott3k) · Alex CloudStar · 0 upvotes · 0 comments
- [Vercel Workflows tutorial: build a durable background job](https://daily.dev/posts/vercel-workflows-tutorial-build-a-durable-background-job-27npsfaqy) · Flavio Copes · 0 upvotes · 1 comments

---

Tags: [#inngest](https://daily.dev/tags/inngest), [#nextjs](https://daily.dev/tags/nextjs), [#websocket](https://daily.dev/tags/websocket)

[View this post on daily.dev](https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to add background jobs with real-time updates to a Next.js application","url":"https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au"},"datePublished":"2026-09-13T19:57:14.533Z","dateModified":"2026-10-15T02:22:33.218Z","description":"A step-by-step tutorial shows how to build background jobs with real-time progress updates in a Next.js application using Inngest. Using a sample project...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f1687a98acdfad3b4833597f0ef3eacd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f1687a98acdfad3b4833597f0ef3eacd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"inngest,nextjs,websocket","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"How to add background jobs with real-time updates to a Next.js application"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-add-background-jobs-with-real-time-updates-to-a-next-js-application-vwpgpp3au#faq","mainEntity":[{"@type":"Question","name":"How can I limit the number of concurrent runs for a background job in Inngest?","acceptedAnswer":{"@type":"Answer","text":"You configure the concurrency option when defining the Inngest function, for example concurrency: 2 caps a job to two simultaneous runs. This is set directly on the createFunction call alongside the job id, letting you throttle resource-intensive background jobs like contact imports or campaign sends. daily.dev surfaces practical guidance like this for developers tuning background job throughput."}},{"@type":"Question","name":"How do I resume a dropped connection when subscribing to Inngest Realtime updates in React?","acceptedAnswer":{"@type":"Answer","text":"The useInngestSubscription() hook from @inngest/realtime automatically resumes any lost connection without extra code. If the connection is permanently lost, that state is reflected in the error and state properties returned by the hook, with state becoming closed, so the UI can react accordingly. Developers building resilient real-time features can track patterns like this via daily.dev."}},{"@type":"Question","name":"How do I subscribe to multiple topics or channels with Inngest Realtime in a Next.js app?","acceptedAnswer":{"@type":"Answer","text":"To subscribe to multiple topics on one channel, list them in the topics array passed to getSubscriptionToken(), such as topics: [\"topic1\", \"topic2\", \"topic3\"]. To subscribe to multiple channels, create a separate subscription token for each channel and call useInngestSubscription() once per channel. daily.dev helps developers wiring up multi-channel real-time subscriptions keep up with patterns like this."}}]}
```

