Hi,
I am receiving avro messages from Kafka spout in below schema .
{
"type": "record",
"name": "generic_wrapper",
"namespace": "oracle.goldengate",
"fields": [{
"name": "table_name",
"type": "string"
}, {
"name": "schema_fingerprint",
"type": "long"
}, {
"name": "*payload*",
"type": "*bytes*"
}]
}
This is deserialized using Kafk Spout in Storm 1.0.0 using below config in
topology
*Builder<String, MdpData> builder = new KafkaSpoutConfig.Builder<String,
MdpData>(kafkaBootstrapServers,*
* StringDeserializer.class, AvroDeserializer.class,
topicName);*
* KafkaSpoutConfig<String, MdpData> spoutConfig =*
*
builder.setGroupId(kafkaGroupId).setProp(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG,
"false")*
*
.setFirstPollOffsetStrategy(FirstPollOffsetStrategy.UNCOMMITTED_EARLIEST).build();*
* KafkaSpout<String, MdpData> kafkaSpout = new KafkaSpout<String,
MdpData>(spoutConfig);*
There is another schema associated to payload field in the above schema and
i need to do one deserialization to retrieve the payload bytes to a java
POJO.
Can i use java deserialization in the bolt to acheive this . There is only
one bolt.
In docs , its mentioned java deserialization is not good in terms of
performance .
Whats the other option to deserialize tje payload bytes .
Regards
Pradeep S