Skip to main content
prompt GP ChatGPT

Event-Driven Architecture taste — ChatGPT prompt: what it does

Sets architectural guidelines for distributed systems: past-tense domain events, transactional outbox patterns, idempotent consumers, and sagas over two-phase commits.

Open on GitHub

What Event-Driven Architecture taste does

This prompt sets design criteria with explicit confidence ratings for asynchronous service architectures. It strictly distinguishes facts from commands: past-tense events report what happened (OrderPlaced), while commands target a single owner (ChargeCard). Schemas require versioning through Avro, Protobuf, or JSON Schema alongside backward compatibility checks in CI.

Reliable message delivery relies on the transactional outbox pattern to prevent data divergence between databases and brokers. Consumers must handle at-least-once delivery with deduplication keys, while poison messages route to dead-letter queues after bounded retries with exponential backoff and jitter. Complex multi-step workflows switch from choreography to sagas with explicit compensating steps.

Without correlation identifiers and trace context passed in message headers, tracking requests across service boundaries breaks down.

What it helps with

  • separate domain events from command requests across microservices
  • prevent state divergence using the transactional outbox pattern
  • design idempotent consumers with explicit deduplication keys
  • replace distributed transactions with sagas and compensating actions

Example prompts for the agent

  • Review this service architecture and apply the event-driven taste guidelines.
  • Design an idempotent event consumer for order processing using outbox and deduplication keys.
  • Structure an event envelope schema including correlation and causation identifiers.

How to install Event-Driven Architecture taste

How to use

Paste the text at the start of a chat or into project instructions

Questions about Event-Driven Architecture taste

How to install Event-Driven Architecture taste in Claude Code?

Add the command to .claude/commands/prompts.csv.md. For ChatGPT, copy and paste the prompt guidelines directly into your chat or custom instructions.

What does Event-Driven Architecture taste do?

It guides models on distributed systems design, enforcing transactional outbox patterns, schema compatibility checks, deduplication keys, and sagas.

What metadata must be included in every event envelope?

Every envelope must contain the event id, type, version, timestamp, correlation id, and causation id.

Source text

prompts.csv · CC0-1.0
# Event-Driven Architecture taste of a distributed systems engineer
- Use events to announce facts that already happened (OrderPlaced), and commands only for requests to a single owner (ChargeCard). Confidence: 0.90
- Name events in the past tense using domain language, never after the producing table or service. Confidence: 0.85
- Define every event with a versioned schema (Avro, Protobuf or JSON Schema) in a registry and check compatibility in CI. Confidence: 0.90
- Evolve schemas only with backward-compatible changes; publish a new event type for breaking changes. Confidence: 0.85
- Assume at-least-once delivery and make every consumer idempotent with a deduplication key. Confidence: 0.95
- Publish events through the transactional outbox pattern so database writes and messages never diverge. Confidence: 0.90
- Include event id, type, version, timestamp, correlation id and causation id in every envelope. Confidence: 0.85
- Keep event payloads self-contained enough for common consumers, but do not dump whole aggregates. Confidence: 0.75
- Partition by aggregate id when ordering matters, and never rely on global ordering. Confidence: 0.85
- Route poison messages to a dead-letter queue after bounded retries with exponential backoff and jitter. Confidence: 0.90
- Alert on consumer lag and dead-letter queue depth, not just on broker health. Confidence: 0.90
- Propagate trace context through message headers so one request can be followed across services. Confidence: 0.85
- Use sagas with explicit compensating actions for multi-service workflows instead of distributed transactions. Confidence: 0.80
- Prefer choreography for simple flows and a dedicated orchestrator once a workflow has more than a few steps. Confidence: 0.70
- Reach for event sourcing only where an audit trail or temporal queries are real requirements. Confidence: 0.75
- Make replays safe: consumers must tolerate reprocessing history from any offset. Confidence: 0.80
- Set retention to match how long consumers might need to rebuild state, and document it per topic. Confidence: 0.70
- Give each topic one owning team that controls its schema and lifecycle. Confidence: 0.85
- Keep synchronous calls for queries that need an immediate answer; do not force request-response through a queue. Confidence: 0.80
- Test consumers with contract tests against the registered schema and producers with outbox integration tests. Confidence: 0.80
- Keep a living catalog (AsyncAPI or similar) of topics, producers and consumers. Confidence: 0.75

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Backend and APIs →

From the same set143

The whole set →
SwiftUI iOS App taste A set of rules for SwiftUI work: how to build screens, where state lives and which APIs to drop. Useful when an agent writes fresh iOS code. GP ChatGPT ★ 174,676repo stars Code Review taste This prompt sets practical review standards for pull requests, from checking correctness to labeling comments by severity. Use it when you want a consistent review checklist. GP ChatGPT ★ 174,676repo stars Universal LLM Operating Guidelines A rule set for LLM-assisted coding: understand the task first, then touch the code. Cuts invented APIs and stray edits. GP ChatGPT ★ 174,676repo stars Web Accessibility taste Sets frontend accessibility standards for interface development. It guides accessible markup, keyboard navigation, and focus handling. GP ChatGPT ★ 174,676repo stars Redis Caching taste A prompt that hands your AI assistant a working set of Redis caching rules: cache-aside reads, TTL with jitter, delete-on-write invalidation. Useful when you design a cache and want the sharp edges covered. GP ChatGPT ★ 174,676repo stars GraphQL API taste A prompt that steers an agent to shape a GraphQL schema from client use cases rather than database tables. Useful when the API exists but the types no longer match what the frontend needs. GP ChatGPT ★ 174,676repo stars Shell Scripting taste Prompt setting strict Bash engineering standards with confidence ratings. It guides AI to write defensive shell scripts with proper traps and error handling. GP ChatGPT ★ 174,676repo stars Web Performance taste This prompt gives frontend work a performance checklist, from real-user Core Web Vitals to JavaScript budgets and image loading. GP ChatGPT ★ 174,676repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor