Class AbstractKafkaMessageListener

    • Field Detail

      • threadCount

        protected int threadCount
      • consumerConnector

        protected kafka.javaapi.consumer.ConsumerConnector consumerConnector
      • kafkaProperties

        protected Properties kafkaProperties
      • consumerIte

        protected List<kafka.consumer.ConsumerIterator<byte[],​byte[]>> consumerIte
      • log

        protected static final org.apache.commons.logging.Log log
    • Constructor Detail

      • AbstractKafkaMessageListener

        public AbstractKafkaMessageListener()
    • Method Detail

      • createKafkaConsumerConnector

        public abstract boolean createKafkaConsumerConnector()
                                                      throws Exception
        Create the connection with the zookeeper
        Throws:
        Exception
      • start

        public abstract void start()
                            throws Exception
        Start to consume the messages from topics
        Throws:
        Exception
      • destroy

        public void destroy()
        Destroy consuming the messages
      • injectMessageToESB

        public abstract void injectMessageToESB​(String name)
        Poll the messages from the zookeeper and injected to the sequence
      • hasNext

        public abstract boolean hasNext()
        Check ConsumerIterator whether It has next value
      • hasMultipleTopicsToConsume

        public boolean hasMultipleTopicsToConsume()
        Used to check whether there are multiple topics to consume from
      • consumeMultipleTopics

        public void consumeMultipleTopics​(String sequenceName)
        Consume from multiple topics