Sample applications showing how to send events to Apache Flume and how to assemble Flume agents, either natively or with Spring Boot:
| Sample | Description |
|---|---|
client |
An application that sends a single event to Flume using Avro. |
native/forwarder |
A Flume agent forwarding events to a second agent. |
native/mongodb |
A Flume agent writing JSON events to MongoDB. |
spring-boot/forwarder |
The forwarder agent, built with Spring Boot. |
spring-boot/mongodb |
The MongoDB agent, built with Spring Boot. |
All agents use File Channels to provide guaranteed delivery.
- Build the samples with
./mvnw install. - Start a MongoDB server with a database named
Eventsand a collection namedevents. To test duplicate detection, add a unique text index onrequestDto.id. - Start one of the MongoDB agents and one of the forwarder agents, as described in their READMEs.
- Run the client. It creates a document in the
eventscollection; running it again does not create a second document, but logs a message in the MongoDB agent.
Note
These samples are a starting point, not production-ready code. They will never be formally released: copy and adapt them to your needs.
Apache Flume Samples is licensed under the Apache License, Version 2.0.