trait KafkaProducer[K, V] extends Serializable
Wraps the Kafka Producer.
Calling producer.send returns a Task[Option[RecordMetadata]]
which can then be run and transformed into a Future.
If the Task completes with None it means that producer.send
method was called after the producer was closed and that
the message wasn't successfully acknowledged by the Kafka broker.
In case of the failure of the underlying Kafka client the producer
will bubble up the exception and fail the Task.
All successfully delivered messages will complete with Some[RecordMetadata].
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- KafkaProducer
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Abstract Value Members
- abstract def close(): Task[Unit]
- abstract def send(record: ProducerRecord[K, V]): Task[Option[RecordMetadata]]
- abstract def send(topic: String, key: K, value: V): Task[Option[RecordMetadata]]
- abstract def send(topic: String, value: V): Task[Option[RecordMetadata]]
- abstract def underlying: Task[org.apache.kafka.clients.producer.KafkaProducer[K, V]]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )