oban v2.6.0 Release Notes
Release Date: 2021-04-02 // about 3 years ago-
โฌ๏ธ ๐ Web and Pro users should check the [v2.6 upgrade guide][v26ug] for a complete walkthrough.
๐ Pluggable Queue Engines
Queue producers now use an "engine" callback module to manage demand and work โจ with the database. The engine provides a clean way to expand and enhance the functionality of queue producers without modifying the solid foundation of queue supervision trees. Engines make enhanced functionality such as global concurrency, local rate limiting and global rate limiting possible!
The
BasicEngine
is the default, and it retains the exact functionality of previous Oban versions. To specify the engine explicitly, or swap in an ๐ง alternate engine, set it in your configuration:config :my_app, Oban, engine: Oban.Queue.BasicEngine, ...
โฌ๏ธ See the [v2.6 upgrade guide][v26ug] for instructions on swapping in an alternate engine.
Recursive Queue Draining
The ever-handy
Oban.drain_queue/1,2
function gained a newwith_recursion
๐ท option, which makes it possible to test jobs that insert more jobs when they execute. Whenwith_recursion
is enabled the queue will keep executing until no โฑ jobs are available. It even composes withwith_scheduled
!โ In practice, this is especially useful for testing dependent workflows.
๐ Gossip Plugin for Queue Monitoring
๐ The new gossip plugin uses PubSub to efficiently exchange queue state information between all interested nodes. This allows Oban instances to broadcast state information regardless of which engine they are using, and without storing anything in the database.
โฌ๏ธ See the [v2.6 upgrade guide][v26ug] for details on switching to the gossip ๐ plugin.
โ Added
๐ท [Oban.Job] Inject the current conf into the jobs struct as virtual field, making the complete conf available within
perform/1
.[Oban.Notifier] Add
unlisten/2
, used to stop a process from receiving notifications for one or more channels.
๐ Changed
[Oban.Telemetry] Stop emitting circuit events for queue producers. As producers no longer poll, the circuit breaker masked real errors more than it guarded against sporatic issues.
[Oban.Telemetry] Delay
[:oban, :supervisor, :init]
event until the complete supervision tree finishes initialization.[Oban.Migration] Stop creating an
oban_beats
table entirely.
๐ Fixed
- โฑ [Oban.Plugins.Cron] Prevent schedule overflow right before midnight