Class

net.liftmodules.kafkaactors

KafkaActorRef

Related Doc: package kafkaactors

Permalink

class KafkaActorRef extends SpecializedLiftActor[Any] with Loggable

A ref to a KafkaActor that will send its message through Kafka.

This class conforms to the LiftActor shape so that it can be plugged into anything that would normally take a LiftActor. However, as we've provided a custom implementation of the send method this actor won't be able to define a working messageHandler.

By default, this producer is configured to ensure all brokers acknowledge a message and to ensure that requests are properly ordered. It's also configured with 10 retries by default. If you'd like to customize these settings, you can override producerPropsCustomizer to change the Properties instance that we use to configure the producer.

Linear Supertypes
Loggable, SpecializedLiftActor[Any], SimpleActor[Any], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaActorRef
  2. Loggable
  3. SpecializedLiftActor
  4. SimpleActor
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KafkaActorRef(bootstrapServers: String, kafkaTopic: String)

    Permalink

    bootstrapServers

    The kafka broker list to connect to in the form of: "host1:port,host2:port,..."

    kafkaTopic

    The kafka topic to produce to.

Value Members

  1. def !(message: Any): Unit

    Permalink

    Produces message to kafkaTopic, blocking until the send call to the brokers is complete.

    Produces message to kafkaTopic, blocking until the send call to the brokers is complete.

    Definition Classes
    KafkaActorRef → SpecializedLiftActor → SimpleActor
  2. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def around[R](f: ⇒ R): R

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  6. def aroundLoans: List[CommonLoanWrapper]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def exceptionHandler: PartialFunction[Throwable, Unit]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  12. def execTranslate(f: (Any) ⇒ Unit)(v: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def highPriorityReceive: Box[PartialFunction[Any, Unit]]

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  17. def insertMsgAtHeadOfQueue_!(msg: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  20. final def messageHandler: PartialFunction[Any, Unit]

    Permalink

    A no-op message handler that cannot be overridden.

    A no-op message handler that cannot be overridden.

    We wanted this class to fit the shape of an actor so that it could be used mostly interchangably with regular actors. To do that we had to provide a messageHandler of some sort. However, because of the nature of the way this class works, it will never handle messages locally and as such has no implementation for doing so.

    Definition Classes
    KafkaActorRef → SpecializedLiftActor
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def onCompletionCallback(metadata: RecordMetadata, exception: Exception): Unit

    Permalink

    Override this method to provide custom success and error handling when the producer has finished its round trip to the broker.

    Override this method to provide custom success and error handling when the producer has finished its round trip to the broker. The default implementation will simply log an exception if one occurs and prevent it from being re-thrown.

    If ensuring delivery is super-important to your application, you may wish to override this to cause your application to crash if producing isn't working.

  25. def onProducerException(exception: Exception): Unit

    Permalink

    Override this method to provide custom error handling when an exception is thrown from the producer's send method.

    Override this method to provide custom error handling when an exception is thrown from the producer's send method. The default implementation will simply log the exception and prevent it from being re-thrown.

    Please refer to the Kafka documentation for the current kinds of exception the Kafka Producer's send method may return.

  26. def producerPropsCustomizer(props: Properties): Properties

    Permalink

    Override this method in the implementing class to customize the producer settings to your liking.

  27. def send(msg: Any): Unit

    Permalink
    Definition Classes
    SpecializedLiftActor
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def testTranslate(f: (Any) ⇒ Boolean)(v: Any): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    SpecializedLiftActor
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Loggable

Inherited from SpecializedLiftActor[Any]

Inherited from SimpleActor[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped