Package infrastructure.events
Class KafkaClient
java.lang.Object
infrastructure.events.KafkaClient
- All Implemented Interfaces:
EventManager
,EventSender
This class manage the Kafka client needed to consume events.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic KafkaClient
Obtain the current instance of the Kafka Client.final void
Method used to send an event through the sender.final void
Method used to consume events via polling providing a consumer to process them.
-
Constructor Details
-
KafkaClient
protected KafkaClient()Default constructor.
-
-
Method Details
-
getInstance
Obtain the current instance of the Kafka Client.- Returns:
- the kafka client.
-
notify
Description copied from interface:EventSender
Method used to send an event through the sender.- Specified by:
notify
in interfaceEventSender
- Parameters:
eventToSend
- the event to send.
-
poll
Description copied from interface:EventManager
Method used to consume events via polling providing a consumer to process them.- Specified by:
poll
in interfaceEventManager
- Parameters:
eventConsumer
- the consumer used to consume the event.
-