Class EntityExtractor +
+This is an helper class to extract data information from a Kafka Record
+Inherited Members
+ + + +Namespace: MASES.EntityFrameworkCore.KNet.Serialization
+Assembly: MASES.EntityFrameworkCore.KNet.Serialization.dll
+Syntax
+public class EntityExtractor
+ Methods +
+ + | + Improve this Doc + + + View Source + + +FromRawValueData(Type, Type, Type, Type, String, Byte[], Byte[], Boolean)
+Extract information for Entity from recordValue
in input
Declaration
+public static object FromRawValueData(Type keyType, Type valueContainer, Type keySerializer, Type valueContainerSerializer, string topic, byte[] recordValue, byte[] recordKey, bool throwUnmatch = false)
+ Parameters
+Type | +Name | +Description | +
---|---|---|
Type | +keyType | +Expected key |
+
Type | +valueContainer | +Expected ValueContainer |
+
Type | +keySerializer | +Key serializer to be used + |
+
Type | +valueContainerSerializer | +ValueContainer serializer to be used + |
+
String | +topic | ++ |
Byte[] | +recordValue | +The Apache Kafka record value containing the information + |
+
Byte[] | +recordKey | +The Apache Kafka record key containing the information + |
+
Boolean | +throwUnmatch | +Throws exceptions if there is unmatch in data retrieve, e.g. a property not available or a not settable + |
+
Returns
+Type | +Description | +
---|---|
Object | +The extracted entity + |
+
FromRecord(ConsumerRecord<Byte[], Byte[]>, Boolean)
+Extract information for Entity from record
in input
Declaration
+public static object FromRecord(ConsumerRecord<byte[], byte[]> record, bool throwUnmatch = false)
+ Parameters
+Type | +Name | +Description | +
---|---|---|
Org.Apache.Kafka.Clients.Consumer.ConsumerRecord<Byte[], Byte[]> | +record | +The Apache Kafka record containing the information + |
+
Boolean | +throwUnmatch | +Throws exceptions if there is unmatch in data retrieve, e.g. a property not available or a not settable + |
+
Returns
+Type | +Description | +
---|---|
Object | +The extracted entity + |
+