configs

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfigs

type AppConfigs struct {
	MessageContentMaxSizeBytes int
	MaxProcessAfterDelayMs     int64 // Maximum delay after which a message can be processed, in milliseconds. Applies to delays provided by the users via API.
	MaxDeliveryAttempts        int
	BackoffDelaysMs            []int64
	QueueTtlMs                 int64
	DlqTtlMs                   int64
	PollingDurationMs          int64 // Duration for which the queue is polled for new messages via HTTP2 long-polling
	MaxProcessingTimeMs        int64 // Maximum time allowed for processing a message before it is considered stale
	MetricsEnabled             bool  // Whether to enable metrics collection
	JobsIntervals              JobsIntervals
	ServerConfig               ServerConfig // Configuration for the server, including timeouts
}

func NewAppConfig

func NewAppConfig(metricsEnabled bool, queueTtlHours, dlqTtlHours int) *AppConfigs

type JobsIntervals

type JobsIntervals struct {
	ExpiredMessagesCleanupMs    int64 // Interval for cleaning up expired messages from the regular queue
	ExpiredDlqMessagesCleanupMs int64 // Interval for cleaning up expired messages from the DLQ
	FailedMessagesCleanupMs     int64 // Interval for cleaning up failed messages from the regular queue
	FailedDqlMessagesCleanupMs  int64 // Interval for cleaning up failed messages from the DLQ
	StaleMessagesCleanupMs      int64 // Interval for cleaning up stale messages from the regular queue and DLQ
	QueuesDepthMetricsMs        int64 // Interval for collecting queue depth metrics
	DbOptimizationMs            int64 // Interval for running PRAGMA optimize on the database
	DbOptimizationMaxDurationMs int64 // Maximum duration for the PRAGMA optimize operation not to block the DB for too long
}

type ServerConfig

type ServerConfig struct {
	Timeouts ServerTimeouts
}

type ServerTimeouts

type ServerTimeouts struct {
	Handle     time.Duration
	Write      time.Duration
	Read       time.Duration
	ReadHeader time.Duration
	Idle       time.Duration
}

Jump to

Keyboard shortcuts

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