kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans <jorg.heym...@gmail.com>
Subject Re: kafka-console-consumer --value-deserializer with access to headers
Date Mon, 11 Nov 2019 14:28:24 GMT
Don't think that option is available there, specifying 'value.deserializer' in my consumer-config.properties
file gives 

[2019-11-11 15:16:26,589] WARN The configuration 'value.serializer' was supplied but isn't
a known config. (org.apache.kafka.clients.consumer.ConsumerConfig)

Does there exist a description of what properties the consumer-config properties file accepts
? I could find only a few references to it in the documentation.

Jorg

On 2019/11/11 13:00:03, "M. Manna" <manmedia@gmail.com> wrote: 
> Hi,
> 
> 
> On Mon, 11 Nov 2019 at 10:58, Jorg Heymans <jorg.heymans@gmail.com> wrote:
> 
> > Hi,
> >
> > I have created a class implementing Deserializer, providing an
> > implementation for
> >
> > public String deserialize(String topic, Headers headers, byte[] data)
> >
> > that does some conditional processing based on headers, and then calls the
> > other serde method
> >
> > public String deserialize(String topic, byte[] data)
> >
> > What i'm seeing is that kafka-console-consumer only uses the second method
> > when a value deserializer is specified. Is there a way to force it to
> > invoke the first method, so i can do processing with headers ? I tried
> > implementing the deprecated 'ExtendedSerializer' but it does not make a
> > difference.
> >
> > Thanks,
> > Jorg
> >
> 
> Have you tried providing a separate prop file using consumer.config
> argument? Please see the reference here:
> 
> --consumer.config <String: config file>  Consumer config properties file.
> Note
>                                            that [consumer-property] takes
>                                            precedence over this config.
> 
> Try that and see how it goes.
> 
> Thanks,
> 

Mime
View raw message