spring-projects / spring-integration-extensions

The Spring Integration Extensions project provides extension components for Spring Integration
http://www.springintegration.org/
279 stars 265 forks source link

Kafka: pass zookeeper namespace information #114

Closed pramakrishnan closed 10 years ago

pramakrishnan commented 10 years ago

Hi, my topics are unders a particular namespace /kafka-production/brokers/topics/notification_development. Is there a way to pass in /kafka-production/ to the consumer. I believe my consumer is trying to look for the topic under the ROOT path in Zookeeper because of which no message is being consumed

<int-kafka:consumer-context id="consumerContext" consumer-timeout="10000" zookeeper-connect="zookeeperConnect" consumer-properties="consumerProperties">
    <int-kafka:consumer-configurations>
        <int-kafka:consumer-configuration group-id="notification_consumer_development" max-messages="1">
                <int-kafka:topic id="*.notification_development" streams="1"/>
        </int-kafka:consumer-configuration>
    </int-kafka:consumer-configurations>
</int-kafka:consumer-context>

Thanks -Parshu

ilayaperumalg commented 10 years ago

@pramakrishnan as long as the zookeeper-connect value points to the correct ZK namespace, you should be good. For instance, if I have my kafka data under namespace /kafka-production, and zk running host:2181, then I would set zookeeper-connect as "host:2181/kafka-production" (http://kafka.apache.org/documentation.html#consumerconfigs) .

pramakrishnan commented 10 years ago

awesome. thank you.