Skip to main content

Crate nzb_dispatch

Crate nzb_dispatch 

Source
Expand description

nzb-dispatch — article-level download dispatcher for the nzb-* engine.

Responsibilities:

  • Per-server worker pool (spawn/retire workers as server config changes)
  • Priority-aware article-fetch scheduling with retry across servers
  • Connection tracking, circuit breaker, byte-level heartbeat
  • Job context lifecycle (register on submit, drain on completion)
  • Hopeless-job detection hooks exposed via progress events

Boundary: the dispatch_engine::DispatchEngine trait is the contract consumed by the job queue / orchestrator layer. Progress is reported back via a mpsc::Sender<dispatch_engine::ProgressUpdate> channel per job.

This crate does NOT own job persistence, post-processing, or the public HTTP API. Those live in nzb-queue, nzb-postproc, and nzb-engine.

Re-exports§

pub use news_engine::NewsDispatchEngine;
pub use news_engine::NewsEngineConfig;
pub use article_failure::ArticleFailure;
pub use article_failure::ArticleFailureKind;
pub use bandwidth::BandwidthConfig;
pub use bandwidth::BandwidthLimiter;
pub use dispatch_engine::DispatchEngine;
pub use dispatch_engine::DispatchHandle;
pub use download_engine::ConnectionSlot;
pub use download_engine::ConnectionTracker;
pub use download_engine::ProgressUpdate;
pub use download_engine::ServerHealth;
pub use download_engine::SlotStatus;
pub use download_engine::WorkerPool;

Modules§

article_failure
Typed failure taxonomy for article downloads.
bandwidth
dispatch_engine
DispatchEngine trait — boundary between the job queue and the article dispatcher.
download_engine
Download engine — shared NNTP worker pool that services all active jobs.
news_engine
NewsDispatchEngineDispatchEngine impl backed by the nzb-news crate.
util

Structs§

ServerProbePolicy
Policy for probing backup servers before committing all missing articles to them.