event-driven-messaging-testing
Skill1 starsChanged 53 days agoMITView on GitHub
Use when testing message queues and event streams — Kafka, RabbitMQ, SQS/SNS, Pub/Sub, NATS, webhooks — covering schema evolution, ordering, at-least-once delivery, idempotent consumers, dead-letter queues, replay, and eventual consistency.
- Sends data out
In this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 42crunch-api-security-testingSkill
- a-b-testingSkill
- acceptance-testingSkill
- accessibility-testingSkill
- ai-agent-evaluationSkill
- ai-code-securitySkill
- ai-ml-testingSkill
- analytics-tracking-testingSkill
- api-testingSkill
- authn-authz-testingSkill
- autonomous-qa-orchestrationSkill
- bdd-gherkin-testingSkill
- blockchain-smart-contract-testingSkill
- bug-reportingSkill
- chaos-resilience-testingSkill
- chatbot-voice-agent-testingSkill
- cicd-testingSkill
- cli-testingSkill
- cloud-infrastructure-testingSkill
- code-coverage-analysisSkill
- compatibility-testingSkill
- compliance-testingSkill
- concurrency-race-condition-testingSkill
- configuration-feature-flag-testingSkill
- contract-testingSkill
- cross-browser-testingSkill
- database-testingSkill
- data-migration-testingSkill
- data-pipeline-etl-testingSkill
- date-time-timezone-testingSkill
- desktop-app-testingSkill
- disaster-recovery-backup-testingSkill
- e2e-testingSkill
- email-notification-testingSkill
- exploratory-testingSkill
- flaky-test-managementSkill
- functional-testingSkill
- fuzz-testingSkill
- game-testingSkill
- graphql-testingSkill
- iac-container-security-testingSkill
- installation-upgrade-testingSkill
- integration-testingSkill
- iot-embedded-testingSkill
- llm-security-auditSkill
- llm-testingSkill
- localization-testingSkill
- manual-testingSkill
- mcp-testingSkill
- memory-leak-resource-testingSkill
- microservices-testingSkill
- mobile-testingSkill
- mutation-testingSkill
- observability-testingSkill
- payment-ecommerce-testingSkill
- performance-testingSkill
- production-monitoring-synthetic-testingSkill
- property-based-testingSkill
- The first 60 shown.
The file
Files
Event-Driven & Messaging Testing
Async systems fail quietly: messages get lost, duplicated, reordered or poisoned, and the effect shows up minutes later somewhere else.
Properties to test
| Property | Test |
| Delivery semantics | Kill consumer mid-processing → message redelivered (at-least-once); no loss |
| Idempotency | Deliver same message 2–5× → same end state (dedupe key / upsert) |
| Ordering | Per-partition/key order preserved; consumer tolerant when cross-key order isn't guaranteed |
| Schema evolution | Old consumer + new producer and vice versa (Avro/Protobuf/JSON Schema compat: BACKWARD/FORWARD/FULL) |
| Poison message | Malformed message → retry N → DLQ, main flow continues; alert fires |
| Retry/backoff | Transient failure retried with backoff; permanent failure not retried forever |
| Backpressure | Slow consumer → lag metric grows, producers throttled, no OOM |
| Replay | Reprocessing a topic from offset 0 yields same result; side effects guarded |
| Transactional outbox | DB write + event publish atomic (no dual-write gap) |
| Eventual consistency | Read-your-writes UX; poll-until with timeout, never sleep |
Tooling
docker compose up -d kafka schema-registry # or Testcontainers
kcat -b localhost:9092 -t orders -P <<< '{"id":1}' # produce
kcat -b localhost:9092 -t orders -C -o beginning -e # consume
kafka-consumer-groups --bootstrap-server :9092 --describe --group billing # lag
rabbitmqadmin list queues name messages_ready messages_unacknowledged
awslocal sqs receive-message --queue-url $Q --max-number-of-messages 10 # LocalStack// Testcontainers Kafka in JUnit 5
@Container static KafkaContainer k = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:7.6.0"));# wait for effect — never sleep
from tenacity import retry, stop_after_delay, wait_fixed
@retry(stop=stop_after_delay(10), wait=wait_fixed(0.2))
def order_is_shipped(): assert db.get(order_id).status == "SHIPPED"Contract & schema
Register schemas; CI check curl -X POST .../compatibility/subjects/orders-value/versions/latest; consumer-driven contracts for messages (Pact message pacts, contract-testing); never remove/rename fields, only add optional ones.
Webhooks
Signature verification (HMAC), replay window/timestamps, retries with 5xx, out-of-order & duplicate delivery, 2xx-fast + async processing, endpoint idempotency, delivery logs.
Failure injection
Broker restart · partition rebalance during processing · network partition (toxiproxy) · consumer crash after side-effect before ack · duplicate producers · clock skew — see chaos-resilience-testing.
Related
microservices-testing, contract-testing, integration-testing, observability-testing, concurrency-race-condition-testing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

