messaging-events

Publish and subscribe to RabbitMQ entity change events with routing keys.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/erymuzuan/motorent --skill messaging-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: messaging-events
Source: https://github.com/erymuzuan/motorent/tree/main/.copilot/skills/messaging-events
Command: npx skills add https://github.com/erymuzuan/motorent --skill messaging-events

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RabbitMQ pub/sub patterns from rx-erp for asynchronous processing of entity changes and system events.

Core Features & Use Cases

  • Topic-based routing with a topic exchange for flexible distribution of domain events
  • Routing Key: {Entity}.{Crud}.{Operation} to organize event streams
  • BrokeredMessage: a wrapper carrying the entity payload, operation, headers, and retry metadata
  • Publishing Messages: automatic emission on SubmitChanges to reflect domain changes
  • Subscriber Base Pattern: a reusable pattern for building type-specific handlers with error handling

Quick Start

Configure a producer to publish domain events on SubmitChanges and wire a subscriber to process them.

Frequently Asked Questions about messaging-events

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up RabbitMQ pub/sub for domain events in an ERP system?

Domain events in RabbitMQ use a topic exchange with a {Entity}.{Crud}.{Operation} routing key format. This structure allows subscribers to filter and process specific entity changes like Rental.Changed.CheckIn asynchronously.

How does the BrokeredMessage wrapper handle retry semantics for failed event processing?

The BrokeredMessage wrapper includes retry metadata alongside the entity payload and headers. Subscribers use a base pattern with built-in error handling to process these messages with guaranteed retry semantics for failed operations.

Can I automatically publish domain events when saving entity changes?

Producers can be configured to automatically publish domain events on SubmitChanges. This automatically emits messages to the RabbitMQ topic exchange whenever entity changes are committed.

What is the best way to route domain events in RabbitMQ for flexible distribution?

The best way to route domain events is using a topic exchange with a {Entity}.{Crud}.{Operation} routing key format. This allows flexible message distribution based on entity type, CRUD operation, and specific event operation.

How do I build a subscriber for type-specific domain event handlers in RabbitMQ?

Build subscribers using a reusable base pattern that provides type-specific handler construction with built-in error handling. This pattern processes BrokeredMessage payloads from the topic exchange based on matching routing keys.

Why does my RabbitMQ subscriber need a base pattern for processing entity events?

A subscriber base pattern is needed to standardize error handling and retry logic across type-specific handlers. It ensures consistent processing guarantees when consuming BrokeredMessage payloads from the topic exchange.