Skip to main content

Crate fx_mq_jobs

Crate fx_mq_jobs 

Source
Expand description

Type-safe, lease-based job queue backed by PostgreSQL.

Jobs are typed messages routed to exactly one registered handler. Each listener instance runs a serial poll loop that spawns one tokio task per message, enforcing per-group concurrency limits: every handler belongs to a concurrency group, and a group’s limit caps how many of its messages run concurrently on a given host.

Structs§

Listener
Job listener that coordinates database polling and message dispatch.
PgIdentifier
Publisher
Service for publishing typed messages to the job queue.
Queries
RegistryBuilder
Builder for creating a registry with typed handlers.
RegistryError
Error returned when no handler is registered for a message type.

Enums§

MigratorError
PgIdentifierParsingError
PublishError

Constants§

FX_MQ_JOBS_SCHEMA_NAME
PostgreSQL schema name used for the job queue’s tables and queries.

Traits§

Handler
Trait for processing typed messages with retry logic.
Message

Functions§

run_migrations
Runs database migrations for the specified schema.