ReadonlynameHuman-readable name for this backend (e.g., 'MongoDB', 'PostgreSQL', 'Redis'). Used for display in dashboards and debugging.
Optional ReadonlynotificationOptional notification channel for real-time job notifications. If provided, Agenda will use this for immediate job processing. If not provided, Agenda falls back to periodic polling.
Optional ReadonlyownsWhether the backend owns its database connection.
Used by agenda.stop() to determine whether to close the connection. Defaults to true if not implemented.
ReadonlyrepositoryThe job repository for storage operations. This is required - every backend must provide storage.
Connect to the backend. Called when agenda.start() is invoked. Should establish database connections, set up notification subscriptions, etc.
Disconnect from the backend. Called when agenda.stop() is invoked. Should clean up connections, unsubscribe from notifications, etc.
Unified backend interface for Agenda.
A backend provides storage (required) and optionally notifications. This allows a single driver to implement both capabilities (e.g., PostgreSQL with LISTEN/NOTIFY) or just storage (e.g., MongoDB without notifications).
Examples: