The Producer
In Pronghorn, a producer is simply responsible for providing data for for parts of a graph. Think of it as (usually) the start of your tree: It consistently checks for data or produces initial data that then flows through pipes and through the stages.
In this Hello World Example, we create a producer that consistently generates a "Hello World" messages, that will then be received by another stage (not this producer). Although not very useful, this demonstrate basic Pronghorn concepts such as how data passing is done.
Creating the Producer
First, let's create a new file named "GreeterStage.java" under src/test/java/com.ociweb
Every new Pronghorn stage needs to extend PronghornStage and have the following components:
A constructor that calls super() and passes in expected input and output pipes.
A startup() method that allows you to initialize your objects and values.
A run() method that performs the logic of the stage.
An optional shutdown() method that lets you clean up the stage.
Using those requirements, let's see what our GreeterStage.java looks like: