Re: Error when using mockSchemaregistry

2018-10-29 Thread Matthias J. Sax
You can use `ByteArrayDeserializer` to get `byte[]` key and value from the consumer and deserialize both "manually" using AvorDeserializer that is created with MockSchemaRegistry. `ConsumerRecord` also give you the topic name for each record via #topic(). -Matthias On 10/29/18 4:03 PM, chinchu ch

Re: Error when using mockSchemaregistry

2018-10-29 Thread chinchu chinchu
Thanks Mathias . How do I deal with this scenario in the case of a consumer that expects a specific record type ?.I am trying to write an integration test for a scenario for the below scenairo.All of these uses an avro object as the value for producer record .I am kind of able to write this

Re: Error when using mockSchemaregistry

2018-10-29 Thread Matthias J. Sax
You set: > senderProps.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,avroSerializer.getClass()); This will tell the Producer to create a new AvroSerailizer object, and this object expects "schema.registry.url" to be set during initialization, ie, you need to add the config to `senderProps`. H