agentsclimarketplace

Event driven

Skill G1Joshi/Agent-Skills/skills/architecture/event-driven

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

Install
npx -y skills add G1Joshi/Agent-Skills --skill event-driven

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.8 KB, 613 tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.