AgentStack
SKILL verified MIT Self-run

Event Driven

skill-g1joshi-agent-skills-event-driven · by G1Joshi

Event-driven architecture with pub/sub and message queues. Use for reactive systems.

No reviews yet
0 installs
16 views
0.0% view→install

Install

$ agentstack add skill-g1joshi-agent-skills-event-driven

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Event Driven? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Event-Driven Architecture (EDA)

EDA is a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. In 2025, it is the backbone of real-time, scalable, and decoupled systems.

When to Use

  • When strict decoupling is required (Producer doesn't know Consumer).
  • High-volume, bursty traffic (using buffering queues).
  • Asynchronous workflows (e.g., "User Signed Up" -> Send Email, Create Wallet, Analytics).
  • Real-time updates (WebSockets/Push).

Quick Start

// Producer (Order Service)
await messageBroker.publish("order.created", {
  orderId: "123",
  userId: "456",
  timestamp: Date.now(),
});

// Consumer (Shipping Service)
// Doesn't need to be online when order is created
messageBroker.subscribe("order.created", async (event) => {
  await shippingService.schedulePickup(event.orderId);
  console.log("Shipping scheduled");
});

// Consumer (Analytics Service)
// New feature added later? No changes to Order Service!
messageBroker.subscribe("order.created", async (event) => {
  await analytics.trackRevenue(event);
});

Core Concepts

Event

A significant change in state (Immutable fact). "OrderCreated" not "CreateOrder".

Broker (Event Bus)

The middleware (Kafka, RabbitMQ, SNS/SQS) that receives, stores, and routes events.

Pub/Sub

Pattern where publishers send messages to a topic, and multiple subscribers receive them independently.

Common Patterns

Event Sourcing

Storing the state of an entity as a sequence of state-changing events rather than the current snapshot.

CQRS (Command Query Responsibility Segregation)

Separating the Read and Write models. Writes publish events; Reads update a denormalized view based on those events.

Transactional Outbox

Ensuring data consistency. Write the event to a DB table in the same transaction as the business logic, then a background worker pushes it to the broker.

Best Practices

Do:

  • Use Schemas (Avro, Protobuf, JSON Schema) to govern event structure (Schema Registry).
  • Ensure Idempotency in consumers (handling the same message twice safely).
  • Monitor Lag (how far behind consumers are).

Don't:

  • Don't use events for synchronous queries (Request/Response via queues is painful).
  • Don't put huge payloads in events (Pass ID + Metadata, reference Blob Storage if needed).

Tools

  • Kafka / Redpanda: High throughput, log-based (replayable).
  • RabbitMQ / ActiveMQ: Queue-based, complex routing.
  • AWS SNS/SQS / Google PubSub: Cloud native.

References

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.