I checked my target topic and I see few messages than the source topic. (If
source topic have 5 messages, I see 2 messages in my target topic) What
settings I need to do ?

And, when I try to consume message from the target topic, I get ClassCast
Exception.

java.lang.ClassCastException: java.lang.String cannot be cast to
xx.yy.core.kafkamodels.KafkaPayload;

* receivedPayload = (KafkaPayload) consumerRecord.value();*


I Merge two topics like;

* KStreamBuilder builder = new KStreamBuilder();*

* KStream<String, KafkaPayload> kafkaPayloadStream =
builder.stream(sourceTopics);*

* kafkaPayloadStream.to(targetTopic);*

* streams = new KafkaStreams(builder, properties);*

* streams.start();*


Why do I see classcast exception when consuming the message?


On 11 October 2016 at 15:19, Ratha v <vijayara...@gmail.com> wrote:

> Hi all;
> I have custom datatype defined (a pojo class).
> I copy  messages from one topic to another topic.
> I do not see any messages in my target topic.
> This works fro string messages, but not for my custom message.
> Waht might be the cause?
> I followed this sample [1]
> [1]
> https://github.com/apache/kafka/blob/trunk/streams/
> examples/src/main/java/org/apache/kafka/streams/examples/
> pipe/PipeDemo.java
>
>
> --
> -Ratha
> http://vvratha.blogspot.com/
>



-- 
-Ratha
http://vvratha.blogspot.com/

Reply via email to