DestinationConfiguration

To implement a DestinationConfiguration:

  • Create a class {MyDestination}Specification extending ConfigurationSpecification

  • Add 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}Configuration extending DestinationConfiguration

  • Add 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 DestinationConfigurationFactory as a @Singleton, using the to...Configuration methods 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 {
// ...

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val batchQueueDepth: Int = 10
Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard

Memory queue settings

Link copied to clipboard

How many calls to StreamLoader.start() can be in flight concurrently.

Link copied to clipboard
Link copied to clipboard