Vendor libraries

Try a vendor today, swap them for a competitor tomorrow, or remove the feature entirely — at the same trivial cost. Pull ready-made capabilities (risk monitoring, metrics analysis, ML inference, sensor fusion, forecasting) into your application without writing any integration code.

Capabilities ship as ordinary Java. No middleware glue layer, no proprietary runtime to learn, no framework lock-in. The vendor wrote it once; your application uses it as if it had always been part of your own codebase.

The mechanism that makes this trivial is the cloud integration service: it wires the vendor's subgraph into your application at compile time, so dropping in a new capability costs no more than dropping in a JAR.

Verified end-to-end — acme_metrics 1.1 is live in the playground today
Multi-vendor capabilities integrated into one applicationFour vendor libraries (Risk Monitoring, Real-time Metrics, ML Inference, Market Data) feed capabilities into a central Your Application box. The result is a single reviewable Java file containing both vendor logic and application code.Risk Monitoringvendor libraryReal-time Metricsvendor libraryML Inferencevendor libraryMarket Datavendor libraryYour Applicationyour business logicyour domain code+ vendor capabilities, integrated for freeFluxtion compilesOne reviewable Java filevendor logic + your logic + integration & event-handling coordinationall generated by Fluxtionsingle audit trail · one deployment artifact
Vendor capabilities flow into your application. The whole stack compiles to a single Java file your team reviews and your auditor approves.
The integration tax disappears

Swapping a vendor costs one Spring XML edit and a recompile. Removing a feature costs one Spring XML edit and a recompile. Adding a new vendor costs one Spring XML edit and a recompile. The substrate handles the rest.

For the library vendor
  • Shorter sales cycles. Integration is trivial; you skip the "can we make it work in our stack?" proof-of-concept loop.
  • No framework you have to ship. Your JAR contains nodes and Java event types. No Spring/Kafka/agent runtime to bundle or support.
  • Composable with other vendors. Two libraries from different parties work side by side in the same customer's processor. No collisions, no priority wars.
  • Audit-friendly from day one. Compliance-shy customers adopt without a security review of opaque bytecode — your nodes appear in their reviewable source.
  • Reduced support load. Customer bug reports come with a reproducible artifact — the generated .java that captures every detail of how your library was wired in.
For the application developer
  • Zero glue code. Drop the JAR in, name the entry-point beans in XML, done. No adapter, no proxy, no bridging layer to write or maintain.
  • Vendor swappability. Replace one vendor with a competitor by changing one line of XML and recompiling. Vendors compete on substance, not on lock-in.
  • Single signed-off asset. Library code and your code compile into one .java file. One artifact for security review, compliance sign-off, and audit.
  • No middleware lock-in. Your runtime classpath is fluxtion-runtime + the vendor JAR + your code. No transitive framework, no surprise dependencies.
  • Test and debug like ordinary code. Set a breakpoint in a vendor method — it hits. Drive events in JUnit, assert state. No reflective stack, no proxy layer.

What this replaces

Adopting a third-party library normally means writing and maintaining a stack of integration code yourself. With Fluxtion that stack disappears:

Without FluxtionWith Fluxtion
Custom integration adapter per libraryDrop the JAR on the classpath
Configuration mapping — YAML, properties, custom DSLsOne or two Spring XML beans
Lifecycle plumbing — init order, shutdown propagationGenerated for you
Event-dispatch wiring between vendor code and your codeInferred from field references at compile time
Per-vendor security and audit reviewOne reviewable Java file covers the whole stack

When this pattern fits

Good fit
  • You want to buy an event-handling capability — metrics analysis, sensor fusion, forecasting — instead of building it
  • You want audit, replay, and review guarantees applied to third-party code as well as your own
  • Your application is built from a stable set of building blocks, not invented on the fly
  • You'd like the library's logic to appear in your reviewable source, not hidden behind a runtime API
Not a good fit
  • The library decides at runtime which capabilities to load, based on the event stream
  • The topology has to mutate per-event (different code path needed — see compileDispatcher)
  • The vendor refuses to ship a maven JAR — you'd need source access instead
How it works

If you ship a library

Every node class in your JAR ships two constructors:

public class MetricsAggregator {

    private final MetricsCollector collector;

    // 1. No-arg ctor — ease-of-use authoring.
    //    Spring XML / drag-and-drop / LLM-emitted topologies can
    //    reference this bean without wiring dependencies manually.
    //    Internally builds dependent nodes and delegates.
    public MetricsAggregator() {
        this(new MetricsCollector());
    }

    // 2. Field-matching ctor — Fluxtion source-gen picks this one
    //    when emitting reconstruction code. Parameters map onto
    //    the renderable fields one-for-one.
    public MetricsAggregator(MetricsCollector collector) {
        this.collector = collector;
    }

    @OnTrigger
    public boolean onCollectorUpdate() { ... }
}

That's the whole contract. Spring instantiates your bean via the no-arg ctor; the dependent node becomes a private field; Fluxtion source-gen walks that field at compile time and discovers MetricsCollector as a transitive node — without it ever appearing in the integrator's XML.

How field-walking turns one bean into a subgraphIntegrator's XML names the MetricsAggregator bean. Spring builds it via its no-arg constructor, which sets up a private MetricsCollector field. At build time Fluxtion source-gen walks that field and emits both nodes in the generated processor.INTEGRATOR'S XML<bean id="aggregator"class="MetricsAggregator"/>names ONE beanno mention of MetricsCollectorVENDOR'S NO-ARG CTORMetricsAggregatorprivate finalMetricsCollector collectordependent node is nowa field on the aggregatorGENERATED PROCESSORMetricsCollector c =new MetricsCollector();MetricsAggregator a =new MetricsAggregator(c);BOTH nodes materialisedvia field-walking
One bean named in XML → the vendor's no-arg ctor stashes the dependent node as a field → Fluxtion walks the field at build time and emits both nodes.

What to ship

  • A normal maven JAR — Java 8 bytecode, no shading required.
  • fluxtion-runtime as a provided dependency. Your consumer's runtime already has it.
  • No Spring dependency. Integrators choose their own bean wiring framework; your library shouldn't dictate.
  • A README that names your entry-point beans (the ones integrators reference in XML) vs. your internal nodes (the ones field-walking pulls in).

Your library inherits this

Every Fluxtion vendor library gets these substrate properties for free — your code only writes the domain logic, the rest is generated when the integrator compiles:

  • Event coordination is generated across your nodes and the integrator's. You don't have to wire dispatch, callbacks, or fan-out.
  • Lifecycle propagation — your nodes get init / start / stop / tearDown in dependency order automatically.
  • Audit and replay compatibility — every event through your library passes through a deterministic, loggable path. Your customers' compliance team already has the workflow.
  • Embed-ready everywhere — the resulting processor is a plain Java object. Drops into a service, an agent loop, a batch job, a web handler.
  • Mongoose-ready — your library deploys into Fluxtion's production runtime container alongside any other vendor's library, without extra packaging work on your part.

Worked example

telaminai/acme_metrics — 3 event types + 8 nodes (3 collectors / aggregator / averager / alerter / 2 publishers). Includes a JUnit smoke test that compiles the subgraph in-process via FluxtionSpring and asserts state across every node. Use it as a template.

If you consume a library

Drop the JAR on your classpath. Reference the library's entry-point beans in your Spring XML — usually one or two — without mentioning the internal nodes.

<bean id="aggregator" class="com.acme.metrics.MetricsAggregator"/>

<bean id="publisher" class="com.acme.metrics.MetricsPublisher">
    <constructor-arg ref="aggregator"/>
</bean>

Two beans in XML. The generated processor contains eight nodes — the library's three collectors, three transformers (aggregator, averager, alerter), and two publishers. All wired by trigger edges Fluxtion inferred from constructor field types.

What you actually get

  • A .java file showing every node the library contributed — same review workflow as your own code.
  • A .graphml rendering of the full topology — your compliance team can read it.
  • A compiled .class that only depends on fluxtion-runtime + the library JAR at deployment time.
  • All event coordination automatically generated. No switch statements, no per-event dispatch glue — Fluxtion emits it from the topology you composed.
  • Lifecycle coordination. init() / start() / stop() / tearDown() propagate through every node in dependency order. You call one method on the processor; the substrate fans out the rest.
  • Event-sourcing, audit, and replay compatible out of the box. Every event is dispatched through a deterministic path that can be logged, captured, and re-driven through a fresh processor to reproduce state exactly.
  • Ready to embed in your existing infrastructure — service, agent, batch job, web handler. The processor is a plain Java object: instantiate, call init(), feed events, read state.
  • Ready for deployment into Mongoose — Fluxtion's runtime container for production (agent threading, lifecycle, ops endpoints). Same processor across simulation, soak-testing, and production; only the deployment plumbing changes.

Open the playground — pulls the library as a real maven artifact, runs the AOT build, prints the output. Generated source + graphml are both visible in the project tree.

Run the live example

Or — read the library source at telaminai/acme_metrics, or see how the vendor-JAR pattern fits alongside other authoring channels on Code-gen at a glance.

Building a library?

Fork acme_metrics as your starting point. The pom layout, the two-ctor contract, and the JUnit smoke test transfer directly. Tell us what you're building — we'll list your library here when it's published.