K - The key typeA - The attributes typeT - The CloudEvent 'data' typepublic class CloudEventsKafkaProducer<K,A extends Attributes,T> extends Object implements org.apache.kafka.clients.producer.Producer<K,CloudEvent<A,T>>
| Constructor and Description |
|---|
CloudEventsKafkaProducer(Properties configuration,
EventStep<A,T,byte[],byte[]> builder)
Instantiate a producer to emit
CloudEvent instances in Kafka |
| Modifier and Type | Method and Description |
|---|---|
void |
abortTransaction() |
void |
beginTransaction() |
void |
close() |
void |
close(long arg0,
TimeUnit arg1) |
void |
commitTransaction() |
void |
flush() |
void |
initTransactions() |
Map<org.apache.kafka.common.MetricName,? extends org.apache.kafka.common.Metric> |
metrics() |
List<org.apache.kafka.common.PartitionInfo> |
partitionsFor(String arg0) |
Future<org.apache.kafka.clients.producer.RecordMetadata> |
send(org.apache.kafka.clients.producer.ProducerRecord<K,CloudEvent<A,T>> event) |
Future<org.apache.kafka.clients.producer.RecordMetadata> |
send(org.apache.kafka.clients.producer.ProducerRecord<K,CloudEvent<A,T>> event,
org.apache.kafka.clients.producer.Callback callback) |
void |
sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> arg0,
String arg1) |
public CloudEventsKafkaProducer(Properties configuration, EventStep<A,T,byte[],byte[]> builder)
CloudEvent instances in Kafkaconfiguration - To build the KafkaProducer for delegationbuilder - The builder to build the kafka records valuepublic Future<org.apache.kafka.clients.producer.RecordMetadata> send(org.apache.kafka.clients.producer.ProducerRecord<K,CloudEvent<A,T>> event)
send in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public Future<org.apache.kafka.clients.producer.RecordMetadata> send(org.apache.kafka.clients.producer.ProducerRecord<K,CloudEvent<A,T>> event, org.apache.kafka.clients.producer.Callback callback)
send in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public void abortTransaction()
throws org.apache.kafka.common.errors.ProducerFencedException
abortTransaction in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>org.apache.kafka.common.errors.ProducerFencedExceptionpublic void beginTransaction()
throws org.apache.kafka.common.errors.ProducerFencedException
beginTransaction in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>org.apache.kafka.common.errors.ProducerFencedExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public void close(long arg0,
TimeUnit arg1)
close in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public void commitTransaction()
throws org.apache.kafka.common.errors.ProducerFencedException
commitTransaction in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>org.apache.kafka.common.errors.ProducerFencedExceptionpublic void flush()
flush in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public void initTransactions()
initTransactions in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public Map<org.apache.kafka.common.MetricName,? extends org.apache.kafka.common.Metric> metrics()
metrics in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public List<org.apache.kafka.common.PartitionInfo> partitionsFor(String arg0)
partitionsFor in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>public void sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndMetadata> arg0, String arg1) throws org.apache.kafka.common.errors.ProducerFencedException
sendOffsetsToTransaction in interface org.apache.kafka.clients.producer.Producer<K,CloudEvent<A extends Attributes,T>>org.apache.kafka.common.errors.ProducerFencedExceptionCopyright © 2019. All rights reserved.