public abstract class KafkaSender extends zipkin.internal.LazyCloseable<org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]>> implements Sender
This sender is thread-safe.
This sender remains a Kafka 0.8.x consumer, while Zipkin systems update to 0.9+.
| Modifier and Type | Class and Description |
|---|---|
static class |
KafkaSender.Builder
Configuration including defaults needed to send spans to a Kafka topic.
|
| Modifier and Type | Method and Description |
|---|---|
static KafkaSender.Builder |
builder() |
zipkin.Component.CheckResult |
check()
Ensures there are no problems reading metadata about the topic.
|
void |
close() |
protected org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]> |
compute() |
static KafkaSender |
create(String bootstrapServers) |
int |
messageSizeInBytes(List<byte[]> encodedSpans) |
void |
sendSpans(List encodedSpans,
Callback callback)
This sends all of the spans as a single message.
|
KafkaSender.Builder |
toBuilder() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencoding, messageMaxBytespublic static KafkaSender create(String bootstrapServers)
public static KafkaSender.Builder builder()
public KafkaSender.Builder toBuilder()
public int messageSizeInBytes(List<byte[]> encodedSpans)
messageSizeInBytes in interface Senderpublic void sendSpans(List encodedSpans, Callback callback)
NOTE: this blocks until the metadata server is available.
public zipkin.Component.CheckResult check()
check in interface zipkin.Componentprotected org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]> compute()
compute in class zipkin.internal.Lazy<org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]>>public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface zipkin.Componentclose in class zipkin.internal.LazyCloseable<org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]>>Copyright © 2016 OpenZipkin. All rights reserved.