Class KAFKAPollingConsumer
- java.lang.Object
-
- org.wso2.carbon.inbound.endpoint.protocol.kafka.KAFKAPollingConsumer
-
public class KAFKAPollingConsumer extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractKafkaMessageListener
messageListener
-
Constructor Summary
Constructors Constructor Description KAFKAPollingConsumer(Properties kafkaProperties, long interval, String name)
Initialize the kafka properties and the polling interval
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Properties
getInboundProperties()
Object
poll()
Create the connection with the zookeeper and inject the messages to the sequencevoid
registerHandler(InjectHandler processingHandler)
Register a handler to implement injection of the retrieved messagevoid
startsMessageListener()
Start the listener to listen when new messages come to the esb,the listener can be high level or low level.
-
-
-
Field Detail
-
messageListener
protected AbstractKafkaMessageListener messageListener
-
-
Constructor Detail
-
KAFKAPollingConsumer
public KAFKAPollingConsumer(Properties kafkaProperties, long interval, String name) throws Exception
Initialize the kafka properties and the polling interval- Throws:
Exception
-
-
Method Detail
-
startsMessageListener
public void startsMessageListener() throws Exception
Start the listener to listen when new messages come to the esb,the listener can be high level or low level.- Throws:
Exception
-
execute
public void execute()
-
registerHandler
public void registerHandler(InjectHandler processingHandler)
Register a handler to implement injection of the retrieved message- Parameters:
processingHandler
-
-
poll
public Object poll()
Create the connection with the zookeeper and inject the messages to the sequence
-
getInboundProperties
public Properties getInboundProperties()
-
-