Skip to content
Advertisement

Tag: apache-kafka

KafkaException: class is not an instance of org.apache.kafka.common.serialization.Deserializer

I want to implement Kafka producer which sends and receives Java Serialized Objects. I tried this: Producer: } Send object: Consumer: // Receive Object When I deploy the Producer I get error during deployment: Caused by: org.apache.kafka.common.KafkaException: class org.engine.plugin.transactions.factory.SaleResponseFactory is not an instance of org.apache.kafka.common.serialization.Deserializer Custom object import org.apache.kafka.common.serialization.Deserializer; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder(toBuilder = true) public class SaleResponseFactory implements

Can an offset of an unassigned partition be committed by KafkaConsumer.commitSync/commitAsync

Can above method be used to commit offset of an unassigned TopicPartition ? I know ConsumerRebalanceListener.onPartitionsRevoked is the right place to do final offset commit before TopicPartition rebalance. But if I commit offset of a partition which consumer does not have in its assigned list now, e.g. it lost it after rebalance, how will Kafka treat it? Answer It will

Is there a need of seperate Key Schema(other than a schema for fields) while writing Avro producer?

I am writing Java Avro Producer code for my project. I have registered an Avro schema for all the fields which need to be passed. My Registered Schema- { “name”: “Claim”, “type”: “record”, “namespace”: “com.schema.avro”, “fields”: [ ] } I am using “icn” field value as a key but I don’t have a key schema registered separately. I am not

running Kafka on WSL and make producer on windows

I’m running Kafka on WSL. I’m trying to make simple producer like this (I’m using intellj) but there’s a problem, when I try to run the code it shows this error i even checked the port on my Windows my question is, is it impossible to make producer on windows and while running kafka on WSL ? Answer Your Kafka

Advertisement