effect-queues-background

Coordinate TypeScript/Effect producers and consumers with bounded queues and backpressure.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/mepuka/adjunct --skill effect-queues-background
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-queues-background
Source: https://github.com/mepuka/adjunct/tree/main/.claude/skills/effect-queues-background
Command: npx skills add https://github.com/mepuka/adjunct --skill effect-queues-background

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Queue and PubSub patterns enable decoupled, backpressure-aware communication between producers and consumers, while background fibers support long-running tasks with graceful shutdown.

Core Features & Use Cases

  • Queue (bounded): backpressure-aware work distribution
  • PubSub (broadcast): multiple subscribers receive events
  • Background Fiber: long-running tasks with controlled shutdown

Quick Start

Create a bounded queue, publish events, fork workers, and interrupt on shutdown.

Frequently Asked Questions about effect-queues-background

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement backpressure-aware queues in TypeScript with Effect?

Backpressure-aware queues in Effect coordinate producers and consumers by bounding queue capacity and blocking producers when full, preventing memory overflow. Create a bounded queue, enqueue events from producers, and fork workers as consumers that dequeue and process items while respecting capacity limits.

What's the difference between Queue and PubSub patterns for background work?

Queues distribute work to a single consumer per item, ensuring load balancing across workers. PubSub broadcasts each event to all subscribers simultaneously. Use Queue for work distribution and PubSub when multiple independent workers need the same event.

How do I handle graceful shutdown for background fibers in Effect?

Graceful shutdown interrupts long-running fibers cleanly by signaling cancellation, allowing workers to complete or flush in-flight tasks. Use explicit interrupt handling and observable logging to track shutdown progress across worker pools.

Can I use multiple worker pools with bounded queues in Effect?

Yes, fork multiple workers from a bounded queue to parallelize consumption. Each worker processes dequeued items independently while backpressure automatically blocks producers if the queue reaches capacity, coordinating load across the pool.

Do I need observability built in for queue and background fiber monitoring?

Observable logging and metrics are essential for production queues and background fibers to track throughput, latency, errors, and shutdown completion. Effect supports instrumentation to monitor backpressure, worker health, and task outcomes.