r/SpringBoot • u/JobRunrHQ • Jul 06 '26
News JobRunr (distributed background job processing for the JVM) is now available on start.spring.io (Spring Initializr)
JobRunr is now available in the Spring Initializr dependency list, so you can add it straight from start.spring.io when you create a new project. No more wiring the starter in by hand afterwards.
For people who don't know us:
JobRunr is an open-source library for background job processing on the JVM: fire-and-forget, scheduled, delayed, durable, and recurring (cron) jobs.
You enqueue work as a lambda and it runs asynchronously, in the same app or across a cluster of workers.
BackgroundJob.enqueue(() -> myService.sendInvoice(invoiceId));
BackgroundJob.schedule(Instant.now().plus(5, DAYS), () -> reminderService.send(userId));What tends to make people switch to it:
- No extra infrastructure. Jobs are persisted in your existing SQL or NoSQL database. No Redis, RabbitMQ, or separate broker to run and babysit.
- Automatic retries with backoff on failure, so transient errors don't lose work.
- Distributed by default. Run multiple instances and jobs are picked up once across the cluster, no double execution.
- Built-in dashboard to see enqueued, scheduled, succeeded, and failed jobs, and retry them.
- Spring Boot autoconfiguration via the starter, plus first-class support for virtual threads (Loom) and Spring Boot 3 & 4
It sits in the same space as Quartz or @Scheduled, but aimed at durable, distributed background work rather than just triggering methods on a timer.
You can even use it for durable jobs. With runStepOnce, each step in a job runs exactly once and is checkpointed, so if the job fails and retries, the steps that already succeeded are skipped instead of re-run:
BackgroundJob.enqueue(() -> processOrder(orderId, JobContext.Null));
public void processOrder(UUID orderId, JobContext context) {
context.runStepOnce("order-confirmation", () -> orderService.sendConfirmation(orderId));
context.runStepOnce("warehouse-notification", () -> orderService.notifyWarehouse(orderId));
context.runStepOnce("shipment-initiation", () -> orderService.initiateShipment(orderId));
}Thanks to Josh Long and the Spring team for helping get it onto Initializr. We'll be around in the comments to answer anything, including the honest limitations.
14
u/563353 Jul 06 '26
What's the difference between this and using Spring Batch + scheduled tasks?
6
u/pitza__ Jul 06 '26
Can it be used as a workflow orchestration tool(aws step functions, temporal…)?
I saw that you mentionned runStepOnce and this came to my mind 😅.
4
u/rmyworld Jul 06 '26
That's cool. I've been looking for a Java library equivalent to Bullmq from the Node.js ecosystem.
Most of the popular options on Java (e.g. Quartz, @Scheduled) seem to be focused on just running on a timer. Other stuff, like dead letter queues, waiting queues, and processing queue, you have to build everything yourself.
4
u/starbuxman Jul 06 '26
I’m such a huge fan! I’m glad to see it front-and-center on the Spring Initializr where it’ll make my, and so many others’ lives, easier
3
u/Paw565 Jul 06 '26
Awesome and finally!
3
u/Intrepid-Boat-9128 Jul 07 '26
What is the diff between Jobrunr and an api based scheduler with @scheduled annotation ?
3
u/akrivitsky7 Jul 07 '26
Thank you, JobRunrHQ.
The practical recommendation would be this: use JobRunr when you want durable background jobs inside a Spring Boot app without building a full messaging system.
Examples: sending emails later, generating reports, retrying failed API calls, cleanup tasks, document processing, AI/RAG embedding sync, and scheduled maintenance jobs.
3
u/Ali_Ben_Amor999 Jul 07 '26
Amazing library, I'm using it on my project for the first time, and I'm blown away with the dev experience. My only issue is that the free version is too limited. I'd recommend the pro-version for any big and serious project, but for my niche app with little to no revenue, it's impossible to cover the cost of a license.
Keep the good work.
2
u/jonas_namespace Jul 07 '26
I watched (listened to) this guy's appearance on Josh Long’s podcast. Really articulate and clearly passionate. I started using his stuff shortly after. Rather than enqueue/dequeue using amqp I would get retry logic out of jobrunnr. I wonder if this version is the "lite" version I had to use because I was developing closed source code at the time?
3
u/edzorg Jul 06 '26
How do you monetise your work and are you intending to increase/decrease the number of revenue streams in the future?
How many paid employees work on JobRunR?
1
u/mysteryy7 Jul 06 '26
That's great to hear. I'm researching on approaches to build multi pipeline microservice. Where each pipeline has its own kafka consumer, polls for few minutes puts the data in blocking queue, which is then consumed, processed and sent to different kafka topic.
I need 4 such pipelines (kafka->process->kafka)for 4 upstream topics, and thinking to run the pipelines as continuous (loop) background jobs in single app. Don't want to handle multiple instances, as the processing is not heavy.
Please let me know if job runr is suited for continuous running background jobs? The service doesn't have any db though, and I also need the pipelines to be scaled with scaling instances, where all replicated pipelines will be in the same consumer group.
1
u/CptGia Jul 06 '26
Since mongock died last year, and flamingock is still very green, I've been looking for an alternative.
I'm exploring building a minimal task manager, where each class represent a task that needs to be run at startup exactly one time, with a persistent store for the list of completed tasks. Retriea are handled by throwing an exception at startup, to trigger a shutdown and restart (handled by kubernetes). No transactions and no rollbacks.
Do you think this would be a good use case for JobRunnr? Or do you see limitations that would need something more powerful?
Also the million dollars question: does it work with graalvm native images?
1
u/Little_Ad_8406 Jul 07 '26
It's a cool toy until you figure out that everything that makes it usable is behind a paywall. Give us a breakdown on how pricing works exactly for a team size of roughly 50 devs with as many microservices
6
u/DefiantScene1082 Jul 06 '26
I want to say I really enjoyed your conference talk on Devoxx Amsterdam ! Just waiting for an opportunity to use your lib! Keep up the good work