Skip to content

Examples

Working examples demonstrating Forage capabilities across datasources, messaging, transactions, and AI.

All examples are self-contained and can be run with Camel JBang or exported to Spring Boot / Quarkus.

Datasource

Example Description
Single Database Basic PostgreSQL connection with SQL, JDBC, and Spring-JDBC components
Multiple Databases Named datasources connecting to PostgreSQL and MySQL simultaneously
Event Booking Transactional booking system with ACID guarantees and rollback
Aggregation Repository IoT event batching with JDBC-backed aggregation
Idempotent Consumer Duplicate prevention with JDBC idempotent repository

JMS

Example Description
Basic Messaging JMS producer/consumer with ActiveMQ Artemis
Transactional JMS XA transactions with Narayana, rollback, and redelivery

Transactions

Example Description
Distributed XA Single XA transaction spanning JMS and JDBC

AI

Example Description
Single Agent AI agent with tool use and memory (Ollama)
Multi-Agent Multiple agents with different providers (Gemini + Ollama)
RAG Retrieval-Augmented Generation with embeddings and vector store