CustomTransformer API
Custom parser converts an internal Joule StreamEvent into a domain object
Objective
A CustomTransformer implementation converts a StreamEvent to a custom domain type ready for consumer processing.
Example
This example maps StreamEvent attributes to a Quote object attributes.
Class: CustomTransformer
All implementations must provide a concrete implements of the transform
methods.
Constructor
The constructor is required but does not contain any specific logic for this example.
Transform single event method
This core method that converts the StreamEvent
object to a single domain specific object. This is performed by a simple attribute mapping from the StreamEvent to Quote constructor parameter requirements.
Transform batch events method
This method is called when in micro-batching mode. It takes a collection of StreamEvents and converts to a collection of domain specific events using the defined single event transform method.
Last updated