messaging

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package messaging defines the transport-agnostic inbound message contract and router shared by subscription adapters (NATS, SQS, …). Adapters unwrap their own wire envelope into a messaging.Message and dispatch it through a Router; application handlers depend only on this package, never on a specific broker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Version string
	Payload json.RawMessage
}

Message is the payload handed to subscription handlers after envelope unwrapping.

type MessageHandler

type MessageHandler func(ctx context.Context, m Message) error

MessageHandler handles a single message for a subject.

type MessageHandlerRegisterer

type MessageHandlerRegisterer interface {
	Register(subject string, h MessageHandler)
}

MessageHandlerRegisterer registers subject handlers; implemented by Router.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL