Component Developer Guide

Practical guidance for developers implementing new Connectors, Stages, and Indexers for Lucille.

This section covers everything you need to implement new Connectors, Stages, and Indexers for Lucille.

Where Your Code Lives

The most common approach is to write your components in your own Java project and put the compiled JAR on the classpath when running Lucille. All approaches require you to reference the component’s fully qualified class name (class = "...") in the config.

1. Use your own local code

Put your classes anywhere in your own package — for example, com.mycompany.ingest.MyStage. Build your project to produce a JAR, then include it on the classpath alongside Lucille when running:

java -Dconfig.file=my-config.conf \
  -cp 'lucille-core/target/lucille.jar:lucille-core/target/lib/*:my-components.jar' \
  com.kmwllc.lucille.core.Runner

Reference your class in the config by its fully qualified name:

stages: [
  {
    class: "com.mycompany.ingest.MyStage"
    myParam: "value"
  }
]

Lucille instantiates components reflectively using the class property. As long as the class is on the classpath and follows the expected constructor signature, it will work — there is no registration step or service loader.

2. Contribute to lucille-core or create a plugin

If your component is general-purpose and has no heavy dependencies, you can contribute it directly to lucille-core. If it depends on a large library, create a new module under lucille-plugins/. See the Contributor Guide for project structure, build conventions, and how to submit a pull request.


What the Framework Gives You

What you are really getting when you adopt Lucille — the division of labor between framework and implementor.

Developing New Components

The basics of how to develop Connectors, Stages, and Indexers for Lucille.

Developing Stages

How to implement a custom Stage for Lucille — skeleton, lifecycle, conditional execution, and the Document API.

Developing Connectors

How to implement a custom Connector for Lucille — skeleton, lifecycle, and publishing documents.

Developing Indexers

How to implement a custom Indexer for Lucille — skeleton, lifecycle, and sending documents to a destination.

Developing File Handlers

How to implement a custom FileHandler for Lucille — parsing a new file format into Documents.

Developing Storage Clients

How to implement a custom StorageClient for Lucille — adding support for a new storage backend.

SPEC Validation System

How Lucille validates configuration before a run starts, catching typos and missing fields at startup.

Quick Reference

Concise code references for the patterns developers use most frequently — threading, Document API, child documents, conditions, and common mistakes.

Testing Pipelines

How to write integration tests for Lucille pipelines using RunType.TEST and the TestMessenger infrastructure.

Javadoc

The published API reference for Lucille, plus the authoring standards for writing Javadoc on new components.