KafkaSubscriber

org.eso.ias.dasu.subscriber.KafkaSubscriber
See theKafkaSubscriber companion object
class KafkaSubscriber(val consumerId: String, kafkaConsumer: KafkaIasiosConsumer, val props: Properties) extends IasioListener, InputSubscriber

Read IASValues from the kafka queue and forward them to the listener for processing.

KafkaSubscriber delegates to KafkaIasiosConsumer and it is mostly a convenience class to use the java KafkaIasiosConsumer class from scala

Filtering by ID, passed in startSuscriber, is supported by delegating to the KafkaIasiosConsumer.

Value parameters

consumerId

the identifier of the consumer

kafkaConsumer

the Kafka consumer

props

additional properties

Attributes

Companion
object
Graph
Supertypes
trait IasioListener
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def cleanUpSubscriber(): Try[Unit]

CleanUp and release the resources

CleanUp and release the resources

Attributes

override def iasiosReceived(iasValues: Collection[IASValue[_]]): Unit

Forward the IASValue received from the kafka topic to the listener

Forward the IASValue received from the kafka topic to the listener

Value parameters

iasValues

The values read from the BSDB

Attributes

See also

IasiosListener

Definition Classes
IasioListener
def initializeSubscriber(): Try[Unit]

Initialize the subscriber

Initialize the subscriber

Attributes

def startSubscriber(listener: InputsListener, acceptedInputs: Set[String]): Try[Unit]

Start to get events and forward them to the listener.

Start to get events and forward them to the listener.

IASIOs whose ID is not in the acceptedInputs set are discarded.

Value parameters

acceptedInputs

the IDs of the inputs accepted by the listener (if empty accepts all the IasValues)

listener

the listener of events

Attributes

Concrete fields

val consumerId: String
val props: Properties