Sorry I had a typo I am correcting it here

Hi All,

I have avro messages in a Kafka topic and the requirement is that I should
be able to parse messages that can either have schema1 or schema2. I was
thinking to create a union of two records but I am not sure if I am doing
it right and I am obviously running into various exceptions like
ArrayOutOfBoundsException and so on.

so I am going to simplify my problem here. Imagine I have the following as
an Example

*schema1: *

*schema2: *

and if I do Schema.CreateUnion(Arrays.asList(schema1, schema2)) I get the



Now say my messages inside kafka topic will be something like this


{"foo": 5}

*message2: *

{"bar": 10}
and if I use unionSchema I am unable to parse it! and I am not sure why? I
can't find any resources on how to do this online. any suggestions will be


On Tue, Jan 9, 2018 at 3:04 AM, kant kodali <[EMAIL PROTECTED]> wrote: