JettFeaturesGalleryBlogPricing
Log inJoin waitlist
Get started
Overview
Join waitlist
FeaturesGalleryBlog
PricingContactPrivacyTerms of service
◇ Blog
Product · ArtikelA calendar that keeps up with your dayDesign · ArtikelDesigning Jett: precision in every detailInfrastructure · ArtikelPremium Blog & Interactive Reader VerificationArchitecture · ArtikelLocal-First Sync Architecture in JettAI & Pipeline · VideoIntelligent Email Processing PipelineFrontend · PodcastDesigning a Custom React Audio Player

In diesem Artikel

The Ingress ChallengeImplementing the Isolation Queue
Video/AI & Pipeline/2026-07-14

Intelligent Email Processing Pipeline

How Jett uses Trigger.dev and background workers to isolate heavy LLM classification tasks, semantic scoring, and auto-labeling from webhook response cycles.

In this video deep dive, we walk through how Jett uses an asynchronous background queue to analyze, label, and index incoming emails without slowing down the initial delivery webhook.


The Ingress Challenge

When a mail provider (like Gmail or Outlook) sends a push notification of a new message, Jett must acknowledge the payload in less than 500ms to prevent timeout errors and redeliveries. Invoking LLMs (which can take 1.5s to 4s) during this HTTP lifecycle is impossible.

Systemübersicht

Implementing the Isolation Queue

Jett uses a database-backed job queue for parsing and classification tasks.

  1. API Webhook Ingress: The webhook validates the token, writes the basic email record, inserts a job row into the classification queue, and immediately returns a 200 OK.
  2. Trigger.dev worker: The background worker polls for pending tasks, checks out a leased row (using SKIP LOCKED to prevent concurrent execution), runs the text extraction, calls the LLM classifier, and persists the resulting AI labels.

This ensures that even during high-traffic sync bursts, the ingress pipeline remains completely responsive.

In diesem Artikel

The Ingress ChallengeImplementing the Isolation Queue