TaskRunna Framework 🏃♂️
A lightweight, single-package job orchestration framework for asynchronous task execution in microservices
✨ Why TaskRunna?
Just com.taskrunna:taskrunna
- no complex module management needed
ListenableFuture
/CompletableFuture
with non-blocking execution
Built-in Prometheus integration for complete observability
Handles pagination, retries, and graceful shutdowns automatically
Minimal setup, maximum functionality - get started in minutes
Multi-threaded execution without blocking main pools
🚀 Quick Start
Installation
dependencies {
implementation("com.taskrunna:taskrunna:1.1.2")
}
Basic Usage
import com.taskrunna.batch.*
// 1. Define your data iterator
class OrderIterator : BaseBatchIterator<Order>() {
override fun loadNextBatch(cursor: String, size: Int) =
orderRepository.findPendingOrders(cursor, size)
override fun extractCursorFrom(order: Order) = order.id
}
// 2. Process with async jobs
val processor = BatchJobProcessor(
iterator = OrderIterator(),
submitJob = { order -> sendToKafka(order) },
onSuccess = { order, result -> markProcessed(order.id) },
onFailure = { order, error -> handleError(order, error) }
)
processor.run() // Processes all orders asynchronously!
🆕 v1.1.2 - Major Simplification!
Consolidated from 2 packages into 1 for much simpler usage:
✅ Before: taskrunna-core
+ taskrunna-batch
(complex)
✅ Now: Just taskrunna
(simple!)
🎯 One import, everything included
📚 Documentation
🚀 Getting Started
Step-by-step tutorial to build your first batch processor with TaskRunna
💡 Examples
Real-world examples: order processing, ETL pipelines, email campaigns
📊 Metrics & Monitoring
Prometheus integration, dashboards, and production observability
📖 API Reference
Complete API documentation for all classes and configurations
🎯 Perfect For
- 🏢 Microservices with batch processing needs
- 🔄 Data pipelines requiring async execution
- 📊 Systems needing production-ready observability
- 👥 Teams who want simple, powerful tools