DestinationConfiguration
To implement a DestinationConfiguration:
Create a class
{MyDestination}Specificationextending ConfigurationSpecificationAdd any mixin
...Specifications from this package (the jackson annotations will be inherited)Add any required custom fields to the spec w/ jackson annotations
Add annotation overrides (note that this will replace the original annotation, so to extend an existing annotation, you must copy the original annotation and add the new fields).
Create a class
{MyDestination}Configurationextending DestinationConfigurationAdd the corresponding mixin
...ConfigurationProviders for any added spec mixins(Add overrides for any fields provided by the providers)
Add custom config to the configuration as needed
Implement
DestinationConfigurationFactoryas a @Singleton, using theto...Configurationmethods from the specs to map to the provided configuration fields(Set your custom fields as needed.)
Add a @Factory injected with DestinationConfiguration, returning a @Singleton downcast to your implementation; ie,
@Factory
class MyDestinationConfigurationProvider(
private val config: DestinationConfiguration
){
@Singleton
fun destinationConfig(): MyDestinationConfiguration =
config as MyDestinationConfiguration
}Now your configuration will be automatically parsed and available for injection. ie,
@Singleton
class MyDestinationWriter(
private val config: MyDestinationConfiguration // <- automatically injected by micronaut
): DestinationWriter {
// ...Properties
The amount of time given to implementor tasks (e.g. open, processBatch) to complete their current work after a failure. Input consuming will stop right away, so this will give the tasks time to persist the messages already read.
Memory queue settings
How many calls to StreamLoader.start() can be in flight concurrently.