Skip to content

Conversation

@psteinroe
Copy link
Owner

@psteinroe psteinroe commented Jan 7, 2026

Summary

  • Add NatsSink that publishes events to NATS subjects
  • Sends event.payload as JSON message
  • Supports dynamic subject routing via event metadata

Configuration

sink:
  type: nats
  url: nats://localhost:4222
  subject: events  # optional default subject

Routing

The target subject is resolved from:

  1. topic field in event metadata (from subscription's metadata or metadata_extensions)
  2. Fallback to subject in config
-- Dynamic subject from table name
metadata_extensions = '[{"json_path": "topic", "expression": "''events.'' || tg_table_name"}]'

Add a NATS sink that publishes events to NATS subjects.

Features:
- Configurable subject prefix
- Dynamic subject routing via metadata
- Single-pass concurrent publishing for efficiency
- Support for NATS server authentication
@psteinroe psteinroe merged commit abf150c into main Jan 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants