我在用斯普林·克劳德的侦探和齐普金的侦探和Kafka的侦探。这是我的pom.xml配置。
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
<version>2.0.0.RC1</version>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
下面是我的申请。yaml:
kafka:
producer:
bootstrap-servers:
- 127.0.0.0:9092
compression-type: gzip
retries: 3
batch-size: 100
acks: all
buffer-memory: 100
sleuth:
sampler:
probability: 1.0
zipkin:
compression:
enabled: true
service:
name: quoteCheckPlatform
sender:
type: kafka
message-timeout: 60
enabled: true
然后,我启动spring boot应用程序,尝试通过浏览器访问,但是我找不到spring cloud send sleuth to kafka。因此,我尝试调试zipkin2.reporter.asyncreporter,并发现每当[flush]方法返回时,转到第265行,即“if(!bundler.isready()&!closed.get())return;“代码显示如下。
void flush(BufferNextMessage<S> bundler) {
if (closed.get()) throw new IllegalStateException("closed");
pending.drainTo(bundler, bundler.remainingNanos());
// record after flushing reduces the amount of gauge events vs on doing this on report
metrics.updateQueuedSpans(pending.count);
metrics.updateQueuedBytes(pending.sizeInBytes);
// loop around if we are running, and the bundle isn't full
// if we are closed, try to send what's pending
if (!bundler.isReady() && !closed.get()) return;
// Signal that we are about to send a message of a known size in bytes
metrics.incrementMessages();
metrics.incrementMessageBytes(bundler.sizeInBytes());
我知道这意味着bufferfull是错误的。但是为什么每次都不是bufferfull,即使我经常调用url?
谢谢大家的关注。
暂无答案!
目前还没有任何答案,快来回答吧!