You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Bendaoud (JIRA)" <ji...@apache.org> on 2015/12/15 16:15:46 UTC

[jira] [Created] (SM-2770) KAFKA CAMEL PRODUCER : Set class partitioner in Spring XML file

Bendaoud created SM-2770:
----------------------------

             Summary: KAFKA CAMEL PRODUCER : Set class partitioner in Spring XML file
                 Key: SM-2770
                 URL: https://issues.apache.org/jira/browse/SM-2770
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-camel, servicemix-components
    Affects Versions: 6.1.0
            Reporter: Bendaoud


Hello,
I am using camel to get a message from mqtt and to publish it to kafka topic. However, kafka topic has three partitions. So i have decided to use a partitioner class to choose how feed the partitions.
My camel configuration.

      <camel:from uri="mqtt://ibm?host=tcp://0.0.0.0:1883&amp;subscribeTopicNames=kafka" />

      <camel:to uri="kafka:0.0.0.0:9092?topic=camel_arrosage&amp;zookeeperHost=10.60.160.30&amp;zookeeperPort=2181&amp;groupId=MoB&amp;serializerClass=kafka.serializer.StringEncoder&amp;partitioner=Kafka.RoundRobinPartitioner"/>

I developed partitioner class ==> Kafka.RoundRobinPartitioner
But when i was starting this route, i catched this error :

 Exception in thread "SpringOsgiExtenderThread-6" org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[kafka://0.0.0.0:9092?groupId=MoB&partitioner=Kafka.RoundRobinPartitioner&serializerClass=kafka.serializer.StringEncoder&topic=camel_arrosage&zookeeperHost=0.0.0.0&zookeeperPort=2181]. Reason: java.lang.ClassNotFoundException: Kafka.RoundRobinPartitioner not found by org.apache.servicemix.bundles.kafka_2.10 [238]

Can anyone help me ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)