Module io.cloudevents.kafka
Package io.cloudevents.kafka.impl
Class KafkaProducerMessageWriterImpl<K>
java.lang.Object
io.cloudevents.kafka.impl.KafkaProducerMessageWriterImpl<K>
- All Implemented Interfaces:
io.cloudevents.core.message.MessageWriter<io.cloudevents.rw.CloudEventWriter<ProducerRecord<K,,byte[]>>, ProducerRecord<K, byte[]>> io.cloudevents.core.message.StructuredMessageWriter<ProducerRecord<K,,byte[]>> io.cloudevents.rw.CloudEventContextWriter,io.cloudevents.rw.CloudEventWriter<ProducerRecord<K,,byte[]>> io.cloudevents.rw.CloudEventWriterFactory<io.cloudevents.rw.CloudEventWriter<ProducerRecord<K,byte[]>>, ProducerRecord<K, byte[]>>
-
Constructor Summary
ConstructorsConstructorDescriptionKafkaProducerMessageWriterImpl(String topic, Integer partition, Long timestamp, K key) -
Method Summary
Modifier and TypeMethodDescriptioncreate(io.cloudevents.SpecVersion version) ProducerRecord<K,byte[]> end()ProducerRecord<K,byte[]> end(io.cloudevents.CloudEventData value) ProducerRecord<K,byte[]> setEvent(io.cloudevents.core.format.EventFormat format, byte[] value) io.cloudevents.kafka.impl.BaseKafkaMessageWriterImpl<ProducerRecord<K,byte[]>> withContextAttribute(String name, String value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.cloudevents.rw.CloudEventContextWriter
withContextAttribute, withContextAttribute, withContextAttribute, withContextAttribute, withContextAttribute, withContextAttributeMethods inherited from interface io.cloudevents.core.message.MessageWriter
writeBinary, writeStructured, writeStructured
-
Constructor Details
-
KafkaProducerMessageWriterImpl
-
-
Method Details
-
end
-
create
-
withContextAttribute
public io.cloudevents.kafka.impl.BaseKafkaMessageWriterImpl<ProducerRecord<K,byte[]>> withContextAttribute(String name, String value) throws io.cloudevents.rw.CloudEventRWException - Specified by:
withContextAttributein interfaceio.cloudevents.rw.CloudEventContextWriter- Throws:
io.cloudevents.rw.CloudEventRWException
-
end
public ProducerRecord<K,byte[]> end(io.cloudevents.CloudEventData value) throws io.cloudevents.rw.CloudEventRWException - Specified by:
endin interfaceio.cloudevents.rw.CloudEventWriter<R>- Throws:
io.cloudevents.rw.CloudEventRWException
-
setEvent
public ProducerRecord<K,byte[]> setEvent(io.cloudevents.core.format.EventFormat format, byte[] value) throws io.cloudevents.rw.CloudEventRWException - Specified by:
setEventin interfaceio.cloudevents.core.message.StructuredMessageWriter<R>- Throws:
io.cloudevents.rw.CloudEventRWException
-