async-jobs-and-events

Automate background jobs, domain events, and asynchronous side effects with queuing and outbox patterns.

4.6k|378|Updated Jun 28, 2024
One-click install
npx skills add https://github.com/latitude-dev/latitude-llm --skill async-jobs-and-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: async-jobs-and-events
Source: https://github.com/latitude-dev/latitude-llm/tree/main/.agents/skills/async-jobs-and-events
Command: npx skills add https://github.com/latitude-dev/latitude-llm --skill async-jobs-and-events

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Background processing is essential for scalability and reliability; this Skill provides a structured approach to decoupling domain logic from HTTP handlers by queuing work, publishing domain events, and handling asynchronous side effects.

Core Features & Use Cases

  • Background jobs for IO, notifications, and projections
  • Domain-event publishing with publisher-consumer decoupling
  • Avoiding orchestration of side effects inside HTTP handlers; enqueue and return
  • Observability, tracing, and outbox/pub-sub patterns across services

Quick Start

Spawn a background worker to process queued domain events and publish downstream notifications.

Frequently Asked Questions about async-jobs-and-events

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

FAQPage Schema
How do I decouple domain event publishing from HTTP handlers?

To decouple domain event publishing from HTTP handlers, you can enqueue background jobs for asynchronous side effects and return immediately. This Skill automates queuing and worker processing to handle downstream notifications reliably outside the request cycle.

What is the outbox pattern for async background workers?

The outbox pattern for async background workers ensures reliable domain-event publishing by persisting events before dispatching them. This Skill applies outbox and pub-sub patterns to guarantee event delivery across bounded contexts without losing queued tasks.

How do I ensure idempotent processing for queued domain events?

Idempotent processing for queued domain events requires deterministic task execution and observable tracing. This Skill provides structured worker processing that safely retries asynchronous side effects without duplicating downstream notifications or data projections.

When do I need background jobs for domain events?

You need background jobs for domain events when handling IO, notifications, or projections that risk blocking HTTP responses. This Skill queues these asynchronous side effects to improve scalability and reliability across services and bounded contexts.

Does this approach support publisher-consumer decoupling across services?

Yes, publisher-consumer decoupling across services is supported through structured event publishing. This Skill separates domain logic from HTTP handlers, allowing independent workers to process queued events and publish downstream notifications across bounded contexts.

How to add observability and tracing to asynchronous workers?

To add observability and tracing to asynchronous workers, you need structured background processing that tracks queued events. This Skill integrates tracing into worker execution, providing visibility into domain-event publishing and asynchronous side effects.