Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// NotifyChannel is the PostgreSQL LISTEN/NOTIFY channel used to receive
// signals when new events are inserted into the outbox table.
// Default: "outbox_events"
NotifyChannel string
// PollInterval defines how often the dispatcher should poll the outbox
// table when no notifications are received on the notify channel.
// Default: 1 second
PollInterval time.Duration
// DeliveryTimeout is the maximum duration allowed for processing a batch
// of events. If exceeded, worker goroutines will be canceled.
// Default: 10 seconds
DeliveryTimeout time.Duration
// MaxDeliveryRetries specifies the maximum number of attempts to deliver
// an event before it is considered permanently failed.
// Default: 10
MaxDeliveryRetries int
// MaxWorkers defines the maximum number of concurrent worker goroutines
// the dispatcher will use to process events in parallel.
// Default: 10
MaxWorkers int
}
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func (*Dispatcher) RegisterMessageHandler ¶
func (d *Dispatcher) RegisterMessageHandler(eventName string, handler event.MessageHandler) error
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
Click to show internal directories.
Click to hide internal directories.