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 ¶
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