class KafkaSourceFactory[K, V] extends SourceFactory with SingleInputGenericNodeTransformation[Source] with WithCachedTopicsExistenceValidator with WithExplicitTypesToExtract
Base factory for Kafka sources with additional metadata variable. It is based on pl.touk.nussknacker.engine.api.context.transformation.SingleInputGenericNodeTransformation 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
- WithExplicitTypesToExtract
- WithCachedTopicsExistenceValidator
- TopicsExistenceValidator
- SingleInputGenericNodeTransformation
- GenericNodeTransformation
- SourceFactory
- Component
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new KafkaSourceFactory(deserializationSchemaFactory: KafkaDeserializationSchemaFactory[ConsumerRecord[K, V]], formatterFactory: RecordFormatterFactory, processObjectDependencies: ProcessObjectDependencies, implProvider: KafkaSourceImplFactory[K, V])(implicit arg0: ClassTag[K], arg1: ClassTag[V])
Type Members
-
type
DefinedParameter = DefinedSingleParameter
- Definition Classes
- SingleInputGenericNodeTransformation → GenericNodeTransformation
-
case class
FinalResults extends TransformationStepResult with Product with Serializable
- Definition Classes
- GenericNodeTransformation
-
type
InputContext = ValidationContext
- Definition Classes
- SingleInputGenericNodeTransformation → GenericNodeTransformation
-
case class
NextParameters extends TransformationStepResult with Product with Serializable
- Definition Classes
- GenericNodeTransformation
-
type
NodeTransformationDefinition = PartialFunction[TransformationStep, TransformationStepResult]
- Definition Classes
- GenericNodeTransformation
-
type
State = KafkaSourceFactoryState[K, V]
- Definition Classes
- KafkaSourceFactory → GenericNodeTransformation
-
case class
TransformationStep extends Product with Serializable
- Definition Classes
- GenericNodeTransformation
-
sealed
trait
TransformationStepResult extends AnyRef
- Definition Classes
- GenericNodeTransformation
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
contextTransformation(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): NodeTransformationDefinition
contextTransformation should handle exceptions raised by prepareInitialParameters
contextTransformation should handle exceptions raised by prepareInitialParameters
- Definition Classes
- KafkaSourceFactory → GenericNodeTransformation
-
val
deserializationSchemaFactory: KafkaDeserializationSchemaFactory[ConsumerRecord[K, V]]
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
extractTopics(params: Map[String, Any]): List[String]
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
- GenericNodeTransformation
-
val
formatterFactory: RecordFormatterFactory
- Attributes
- protected
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
handleExceptionDuringTransformation(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String], ex: Throwable)(implicit nodeId: NodeId): FinalResults
- Definition Classes
- GenericNodeTransformation
-
def
handleExceptionInInitialParameters: List[Parameter]
- Attributes
- protected
-
def
handleUnmatchedTransformationStep(step: TransformationStep, inputContext: InputContext, outputVariable: Option[String])(implicit nodeId: NodeId): FinalResults
- Definition Classes
- GenericNodeTransformation
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
implProvider: KafkaSourceImplFactory[K, V]
- Attributes
- protected
-
def
implementation(params: Map[String, Any], 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 → GenericNodeTransformation
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
kafkaConfig: KafkaConfig
- Attributes
- protected
- Definition Classes
- KafkaSourceFactory → WithCachedTopicsExistenceValidator
-
lazy val
keyTypingResult: TypedClass
- Attributes
- protected
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nextSteps(context: ValidationContext, dependencies: List[NodeDependencyValue])(implicit nodeId: NodeId): NodeTransformationDefinition
- Attributes
- protected
-
def
nodeDependencies: List[NodeDependency]
- Definition Classes
- KafkaSourceFactory → GenericNodeTransformation
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
prepareContextInitializer(dependencies: List[NodeDependencyValue], parameters: List[(String, 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
- GenericNodeTransformation
-
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[(String, DefinedParameter)], errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
-
def
prepareSourceFinalResults(context: ValidationContext, dependencies: List[NodeDependencyValue], parameters: List[(String, DefinedParameter)], keyTypingResult: TypingResult, valueTypingResult: TypingResult, errors: List[ProcessCompilationError])(implicit nodeId: NodeId): FinalResults
- Attributes
- protected
-
val
processObjectDependencies: ProcessObjectDependencies
- 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
topicParameter: ParameterWithExtractor[String]
- Attributes
- protected
-
def
topicsValidationErrors(topic: String)(implicit nodeId: NodeId): List[CustomNodeError]
- Attributes
- protected
-
def
typesToExtract: List[TypedClass]
- Definition Classes
- KafkaSourceFactory → WithExplicitTypesToExtract
-
final
def
validateTopic(topic: String): Validated[TopicExistenceValidationException, String]
- Definition Classes
- TopicsExistenceValidator
-
final
def
validateTopics(topics: List[String]): Validated[TopicExistenceValidationException, List[String]]
- Definition Classes
- WithCachedTopicsExistenceValidator → TopicsExistenceValidator
-
lazy val
validator: CachedTopicsExistenceValidator
- Attributes
- protected
- Definition Classes
- WithCachedTopicsExistenceValidator
-
lazy val
valueTypingResult: TypedClass
- Attributes
- protected
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
FinalResults extends Serializable
- Definition Classes
- GenericNodeTransformation
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.