Sending a message through Kafka - Value serializer not specified and there is no default serializer defined for type
My first attempt to send a typed message through Kafka resulted in the following error message:
Value cannot be null. (Parameter 'Value serializer not specified and there is no default serializer defined for type PageViewEvent)
Here is the code I was using:
As the error message mentions, you need to explicitly specify what serializer should be used for your message object. Therefore you need to use the SchemaRegistryClient and specify a serializer(I’m using Avro in the sample below):