# Dotnet Messaging

> Use this skill for .NET asynchronous integrations using messaging or event-driven architecture, including Kafka, RabbitMQ, background consumers, event contracts, retries, dead-letter flows, ordering concerns, idempotency, and eventual consistency. Do not use for synchronous HTTP-only tasks.

- Skill: `ruano/dotnet-messaging` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ruano/dotnet-messaging`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ruano/dotnet-messaging/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ruano (https://skillmd.com/u/ruano)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ruano/dotnet-messaging

---


# .NET Messaging

## Goal

Guide implementation and review of event-driven and message-driven solutions in .NET.

## Use this skill for

- Kafka consumers and producers
- RabbitMQ integrations
- Background workers
- Event contracts
- Async integration flows
- Dead-letter strategies
- Retry strategies
- Event versioning
- Eventual consistency

## Core rules

- Treat message consumption as at-least-once unless the platform clearly guarantees otherwise.
- Design handlers to be idempotent.
- Distinguish transient failures from permanent failures.
- Define clear retry behavior.
- Define poison message or dead-letter behavior.
- Preserve correlation and trace identifiers across events.
- Avoid mixing transport concerns with business logic.
- Consider Workflow Core when message-driven flows require multi-step orchestration instead of simple event handlers.

## Consumer design

- Keep the transport adapter small.
- Move business processing to dedicated services/use cases.
- Validate payload shape early.
- Record processing outcomes clearly.
- Make retries bounded and intentional.

## Event contracts

- Prefer stable, versioned contracts.
- Do not break consumers accidentally.
- Favor additive evolution when possible.

## Operational concerns

- Watch partition or queue backlogs.
- Log retries, failures, and terminal states.
- Expose metrics for throughput, failures, and lag when applicable.

