First version
This project contains:
In all of these cases File Channels are used to provide guaranteed delivery.
To run these samples first install MongoDb. There are a couple of options to do this but on MacOS using homebrew works quite nicely. Once it is installed MongoDb Compass can be used to create a database named “Events” and a collection named “events”. To fully test the MongoDb Sink also create an index on requestDto.id as a text field and mark it as unique.
Once MongoDb is up and running start a Flume MongoDb instance and a Flume Forwarder instance using the instructions found in those projects. Finally, run the FlumeClient. The first run will cause a document to be created in the events collection. If it is run again a second record will NOT be created and a message will be logged in the Flume MongoDb log file.
NOTE: These samples are just that. They are NOT intended to be used as is without some customization. For example, it is extremely unlikely your application will be as simple as FlumeClient and your services are not likely all going to run on localhost. For that reason there should be no expectation that there will ever be formal “releases” of the code in this repository. However, please feel free to take the source code and modify it to meet your specific needs.