Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Cannot cast to kafka.producer.async.CallbackHandler

$
0
0
I'm trying to set a callback handler from java.

For that, I created a Callback Handler this way:

public class KafkaAsyncCallbackHandler implements CallbackHandler<byte[]> {

and set the property

callback.handler=com.lucid.kafka.KafkaAsyncCallbackHandler

But on runtime I get this exception coming from kafka:

Caused by: java.lang.ClassCastException:
com.lucid.kafka.KafkaAsyncCallbackHandler cannot be cast to
kafka.producer.async.CallbackHandler
at kafka.producer.ProducerPool.<init>(ProducerPool.scala:62)
at kafka.javaapi.producer.Producer.<init>(Producer.scala:41)
at
com.lucid.dao.queue.impl.kafka.KafkaProducer.<init>(KafkaProducer.java:29)
at com.lucid.dao.guice.DAOModule.provideProducer(DAOModule.java:448)

We are on kafka 0.7.1

Am I doing anything wrong here?

Thanks
Patricio

Viewing all articles
Browse latest Browse all 5648

Trending Articles