Running a Joule from the CLI
Joule ships with a Command Line Interface (CLI) for running your Joule project. To use the CLI your workflow generally looks like this:
Define your use case using the Joule DSL
Develop custom components within an IDE and test them locally, if required
Define the required data sources and sinks using Joule DSL
Run your use case from the command line
Example
java -cp "./lib/*" com.fractalworks.streams.joule.JouleCLI \
-s eventSource.yaml \
-e usecase.yaml \
-p publishSinks.yamlCommand line arguments
The CLI has a few command line arguments to run the Joule process.
Required
-s or --sourcefor data source file-u or --usecasefor stream processing use case file-p or --publishfor event sinks file
Optional
-c or --configfor custom Joule process configuration file-r or --refdatafor reference data sources file
Alternatively
Use the provided scripts within the example projects copy them to your project environment. See use cases running examples documentation.
Start Joule
Start up the Joule process. Joule will use the conf/app.env configuration as its executing use case.
./bin/startJoule.shStart Quote generator
By starting the quote simulator events will be published to Kafka ready for Joule to consume and process
./bin/startQuotePublisher.shShutting down processes
To stop the running processes just execute the below under the directory of which you started the processes
/bin/stopQuotePublisher.sh
/bin/stopJoule.shClean up environment
Once you have run the example and viewed the results you can cleanup the environment by running the below script.
./bin/cleanup.shPrerequisites
OpenJDK 19+ to run the platform
To develop components read the setting up environment document for detailed requirements.
Within the example repository, we have provided a bash script for additional functionality. Check the README.MD for further information
Last updated
Was this helpful?