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 AbstractKafkaMessageListenermessageListener
-
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 voidexecute()PropertiesgetInboundProperties()Objectpoll()Create the connection with the zookeeper and inject the messages to the sequencevoidregisterHandler(InjectHandler processingHandler)Register a handler to implement injection of the retrieved messagevoidstartsMessageListener()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 ExceptionStart 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()
-
-