nats-patterns

Standardize NATS request-reply and JetStream event patterns across microservices.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/PremModhaOfficial/motadata-ai-pipeline --skill nats-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nats-patterns
Source: https://github.com/PremModhaOfficial/motadata-ai-pipeline/tree/main/.claude/skills/nats-patterns
Command: npx skills add https://github.com/PremModhaOfficial/motadata-ai-pipeline --skill nats-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hybrid NATS usage across microservices to ensure tenant isolation, reliable messaging, and observability.

Core Features & Use Cases

  • Provides two communication patterns: Request-Reply for synchronous RPC, and JetStream events for durable asynchronous messaging.
  • Enforces per-service streams for events, tenant-scoped subjects, queue groups for load balancing, and trace context propagation.
  • Supports optional utilities such as a KV store and DLQ patterns to improve reliability and observability in production deployments.

Quick Start

Install and configure your Go service to connect to NATS, implement request handlers for RPC, and register JetStream event subscribers following the patterns.

Frequently Asked Questions about nats-patterns

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

FAQPage Schema
How do I standardize NATS request-reply and JetStream usage across Go microservices?

Standardizing NATS usage across Go microservices involves enforcing consistent tenant isolation, error handling, and observability for synchronous request-reply RPC and durable JetStream event streaming.

What is the best way to ensure tenant isolation with NATS JetStream in a microservices architecture?

Ensuring tenant isolation with NATS JetStream requires implementing tenant-scoped subjects and per-service streams to maintain consistent data separation across microservices.

How do I propagate trace context and handle errors in NATS Go microservices?

Propagating trace context and handling errors in NATS Go microservices is achieved by applying standardized patterns that enforce observability and support dead letter queue (DLQ) configurations.

Can I use NATS queue groups for load balancing with JetStream events in Go?

You can use NATS queue groups with JetStream events in Go to distribute messages among subscribers for load balancing alongside per-service stream creation.

Does this NATS pattern include utilities for key-value storage and dead letter queues?

This NATS pattern includes optional key-value (KV) store utilities and dead letter queue (DLQ) patterns to improve reliability and observability in production deployments.

When do I need per-service streams for NATS JetStream events?

Per-service streams for NATS JetStream events are needed when implementing durable asynchronous messaging to ensure isolated event storage and consistent tenant-scoped subject routing.