HbKafkaConsumer

org.eso.ias.heartbeat.consumer.HbKafkaConsumer
See theHbKafkaConsumer companion object
class HbKafkaConsumer(brokers: String, val consumerId: String) extends StringsConsumer, Runnable

The HbKafkaConsumer gets HBs from the hb kakfa topic and notifies the registered listeners

HbKafkaConsumer is the listener of the KafkaStringsConsumer and forward the events to registered listeners. Events received from the topic are stored in a temporary buffer and sent to the listeners asynchronously

Value parameters

brokers

Kafka brokers to connect to

consumerId

The id for the consumer

Attributes

Companion
object
Graph
Supertypes
trait Runnable
trait StringsConsumer
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addListener(listener: HbListener): Unit

Add a lsitener to be notifiwed of HB events

Add a lsitener to be notifiwed of HB events

Value parameters

listener

the not empty listener to add

Attributes

def isReady: Boolean

Return true if the kafka string consumer is ready to get logs

Return true if the kafka string consumer is ready to get logs

Attributes

def notifyListeners(event: HbMsg): Unit

Notify all registered listener of a new events read from the kafka topic

Notify all registered listener of a new events read from the kafka topic

Value parameters

event

The HB event

Attributes

override def run(): Unit

The thread that gets events from the queue and notify the listeners

The thread that gets events from the queue and notify the listeners

Attributes

Definition Classes
Runnable
def shutdown(): Unit

Stop getting events

Stop getting events

Attributes

def start(): Unit

Start getting events

Start getting events

Attributes

def stringsReceived(strings: Collection[String]): Unit

One or more HBs has been read from the kafka topic

One or more HBs has been read from the kafka topic

The events are added to the buffer

Value parameters

strings

The strings read from the kafka topic

Attributes

Concrete fields

val consumerId: String
val stringConsumer: KafkaStringsConsumer