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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KafkaClientObtain the current instance of the Kafka Client.final voidMethod used to send an event through the sender.final voidMethod 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:EventSenderMethod used to send an event through the sender.- Specified by:
notifyin interfaceEventSender- Parameters:
eventToSend- the event to send.
-
poll
Description copied from interface:EventManagerMethod used to consume events via polling providing a consumer to process them.- Specified by:
pollin interfaceEventManager- Parameters:
eventConsumer- the consumer used to consume the event.
-