class KafkaSourceFactory[K, V] extends SourceFactory with SingleInputDynamicComponent[Source] with WithCachedTopicsExistenceValidator with WithExplicitTypesToExtract with UnboundedStreamComponent
Base factory for Kafka sources with additional metadata variable. It is based on pl.touk.nussknacker.engine.api.context.transformation.SingleInputDynamicComponent that allows custom ValidationContext and Context transformations, which are provided by KafkaContextInitializer Can be used for single- or multi- topic sources (as csv, see topicNameSeparator and extractTopics).
Features:
- fetch latest N records which can be later used to test process in UI Fetching data is defined in source which may extends pl.touk.nussknacker.engine.api.process.TestDataGenerator. See pl.touk.nussknacker.engine.kafka.KafkaUtils#readLastMessages
- reset Kafka's offset to latest value -
forceLatestRead
property, see pl.touk.nussknacker.engine.kafka.KafkaUtils#setOffsetToLatest
- K
- type of key of kafka event that is generated by raw source (SourceFunction).
- V
- type of value of kafka event that is generated by raw source (SourceFunction).
- Alphabetic
- By Inheritance
- KafkaSourceFactory
- UnboundedStreamComponent
- WithExplicitTypesToExtract
- WithCachedTopicsExistenceValidator
- TopicsExistenceValidator
- SingleInputDynamicComponent
- DynamicComponent
- SourceFactory
- Component
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new KafkaSourceFactory(deserializationSchemaFactory: KafkaDeserializationSchemaFactory[ConsumerRecord[K, V]], formatterFactory: RecordFormatterFactory, modelDependencies: ProcessObjectDependencies, implProvider: KafkaSourceImplFactory[K, V])(implicit arg0: ClassTag[K], arg1: ClassTag[V])
Type Members
- type ContextTransformationDefinition = PartialFunction[TransformationStep, TransformationStepResult]
- Definition Classes
- DynamicComponent
- type DefinedParameter = DefinedSingleParameter
- Definition Classes
- SingleInputDynamicComponent → DynamicComponent
- case class FinalResults extends TransformationStepResult with Product with Serializable
- Definition Classes
- DynamicComponent
- type InputContext = ValidationContext
- Definition Classes
- SingleInputDynamicComponent → DynamicComponent
- case class NextParameters extends TransformationStepResult with Product with Serializable
- Definition Classes
- DynamicComponent
- type State = KafkaSourceFactoryState[K, V]
- Definition Classes
- KafkaSourceFactory → DynamicComponent
- case class TransformationStep extends Product with Serializable
- Definition Classes
- DynamicComponent
- sealed trait TransformationStepResult extends AnyRef
- Definition Classes
- DynamicComponent
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def allowedProcessingModes: AllowedProcessingModes
- Definition Classes
- UnboundedStreamComponent
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def contextTransformation(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): ContextTransformationDefinition
contextTransformation should handle exceptions raised by prepareInitialParameters
contextTransformation should handle exceptions raised by prepareInitialParameters
- Definition Classes
- KafkaSourceFactory → DynamicComponent
- val deserializationSchemaFactory: KafkaDeserializationSchemaFactory[ConsumerRecord[K, V]]
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extractTopics(params: Params): NonEmptyList[ForSource]
Extracts topics from default topic parameter.
Extracts topics from default topic parameter.
- Attributes
- protected
- def fallbackFinalResult(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
- Definition Classes
- DynamicComponent
- val formatterFactory: RecordFormatterFactory
- Attributes
- protected
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def handleExceptionDuringTransformation(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String], ex: Throwable)(implicit nodeId: NodeId): FinalResults
- Definition Classes
- DynamicComponent
- def handleUnmatchedTransformationStep(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String])(implicit nodeId: NodeId): FinalResults
- Definition Classes
- DynamicComponent
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val implProvider: KafkaSourceImplFactory[K, V]
- Attributes
- protected
- def implementation(params: Params, dependencies: List[NodeDependencyValue], finalState: Option[State]): Source
Common set of operations required to create basic KafkaSource.
Common set of operations required to create basic KafkaSource.
- Definition Classes
- KafkaSourceFactory → DynamicComponent
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val kafkaConfig: KafkaConfig
- Attributes
- protected
- Definition Classes
- KafkaSourceFactory → WithCachedTopicsExistenceValidator
- lazy val keyTypingResult: TypingResult
- Attributes
- protected
- val modelDependencies: ProcessObjectDependencies
- Attributes
- protected
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextSteps(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): ContextTransformationDefinition
- Attributes
- protected
- def nodeDependencies: List[NodeDependency]
- Definition Classes
- KafkaSourceFactory → DynamicComponent
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def prepareContextInitializer(dependencies: List[NodeDependencyValue], parameters: List[(ParameterName, DefinedParameter)], keyTypingResult: TypingResult, valueTypingResult: TypingResult): ContextInitializer[ConsumerRecord[K, V]]
- Attributes
- protected
- final def prepareFinalResultWithOptionalVariable(inputContext: InputContext, outputVariable: Option[(String, TypingResult)], state: Option[State])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
- Definition Classes
- DynamicComponent
- def prepareInitialParameters: List[Parameter]
Basic implementation of definition of single topic parameter.
Basic implementation of definition of single topic parameter. In case of fetching topics from external repository: return list of topics or raise exception.
- Attributes
- protected
- def prepareSourceFinalErrors(context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(ParameterName, DefinedParameter)], errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
- def prepareSourceFinalResults(context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(ParameterName, DefinedParameter)], keyTypingResult: TypingResult, valueTypingResult: TypingResult, errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- val topicNameSeparator: String
- Attributes
- protected
- val topicParameterDeclaration: ParameterCreatorWithNoDependency with ParameterExtractor[String]
- Attributes
- protected
- def topicsValidationErrors(topicsString: String)(implicit nodeId: NodeId): List[CustomNodeError]
- Attributes
- protected
- def typesToExtract: List[TypingResult]
- Definition Classes
- KafkaSourceFactory → WithExplicitTypesToExtract
- final def validateTopic[T <: TopicName](topic: T)(implicit arg0: TopicValidationType[T]): Validated[TopicExistenceValidationException[T], T]
- Definition Classes
- TopicsExistenceValidator
- final def validateTopics[T <: TopicName](topics: NonEmptyList[T])(implicit arg0: TopicValidationType[T]): Validated[TopicExistenceValidationException[T], NonEmptyList[T]]
- Definition Classes
- WithCachedTopicsExistenceValidator → TopicsExistenceValidator
- lazy val valueTypingResult: TypingResult
- Attributes
- protected
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object FinalResults extends Serializable
- Definition Classes
- DynamicComponent
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)