events

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package events hosts the queue shells of the domain-event bus: the publish pump moving outbox rows onto the asynq broker, and the delivery worker running subscribers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeliverDomainEventLogic

type DeliverDomainEventLogic struct {
	// contains filtered or unexported fields
}

DeliverDomainEventLogic is the delivery worker: each task carries one outbox event, and the bus runs every subscriber of its topic. A failing subscriber fails the task so asynq retries with backoff and eventually archives it (the dead-letter queue); subscribers are idempotent, so retries and duplicate deliveries are safe.

func NewDeliverDomainEventLogic

func NewDeliverDomainEventLogic(svcCtx *svc.ServiceContext) *DeliverDomainEventLogic

func (*DeliverDomainEventLogic) ProcessTask

func (l *DeliverDomainEventLogic) ProcessTask(ctx context.Context, task *asynq.Task) error

type DispatchDomainEventsLogic

type DispatchDomainEventsLogic struct {
	// contains filtered or unexported fields
}

DispatchDomainEventsLogic is the publish pump: it drains the generic domain-event outbox onto the asynq queue. Enqueues deduplicate by outbox event id, so the tick can retry freely.

func NewDispatchDomainEventsLogic

func NewDispatchDomainEventsLogic(svcCtx *svc.ServiceContext) *DispatchDomainEventsLogic

func (*DispatchDomainEventsLogic) ProcessTask

func (l *DispatchDomainEventsLogic) ProcessTask(ctx context.Context, _ *asynq.Task) error

Jump to

Keyboard shortcuts

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