Connector API
Connectors are key to enable Joule to perform use cases. Given the importance of Connectors, an API has been provided to enable developers to build and extend the capabilities of the platform.
Last updated
Was this helpful?
Connectors are key to enable Joule to perform use cases. Given the importance of Connectors, an API has been provided to enable developers to build and extend the capabilities of the platform.
Last updated
Was this helpful?
Create project using the template
Define connector specification
Implement custom transport
Build, test and package
Deploy
We have provided a project template project to quick start development. The project can be found . Clone the template project and copy relevant code and structure to your own project
For components to be defined using the Joule DSL a specification class is required. Joule provides a AbstractTransportSpecification
class that is to be extended for your implementation. This class provides core attributes that support a number of features such as:
Batching
Formatting
Parsing Threads
There is an option to create a specification builder in the event of programmactically. See the TemplatePublisherSpecificationBuilder
example class for a reference implementation.
For Joule to load and initialised the component the specifications need to be defined within the plugins.properties
file under the META-INF/services
directory
Now we can move on to building the transport class that will either consume or publish events.
Publisher has two key methods to implement; initialise and publish.
Consumer has two key methods to implement; initialise and start.
The template project provides basic JUnit test to validate DSL. The project will execute these tests during the gradle build cycle and deploy to your local maven repository.
Once your package has been successfully created you are ready to deploy to a Joule project. The resulting jar artefact needs to be placed in to the userlibs
directory in your Joule projects directory. See provided examples for further directions.