TaskRunna Framework 🏃‍♂️

A lightweight, single-package job orchestration framework for asynchronous task execution in microservices

✨ Why TaskRunna?

🎯 Single Dependency

Just com.taskrunna:taskrunna - no complex module management needed

🚀 Async by Design

ListenableFuture/CompletableFuture with non-blocking execution

📊 Production Metrics

Built-in Prometheus integration for complete observability

🔄 Smart Batch Processing

Handles pagination, retries, and graceful shutdowns automatically

🛠️ Plug & Play

Minimal setup, maximum functionality - get started in minutes

High Performance

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

🔗 Useful Links

TaskRunna Framework - Making async batch processing simple and powerful! 🚀