muse-dev[bot] commented on a change in pull request #5660:
URL: https://github.com/apache/skywalking/pull/5660#discussion_r504094563



##########
File path: 
apm-sniffer/optional-reporter-plugins/kafka-reporter-plugin/src/main/java/org/apache/skywalking/apm/agent/core/kafka/KafkaTraceSegmentServiceClient.java
##########
@@ -60,6 +74,39 @@ public void onComplete() {
     @Override
     public void shutdown() {
         TracingContext.ListenerManager.remove(this);
+        carrier.shutdownConsumers();
+    }
+
+    @Override
+    public void init() {
+
+    }
+
+    @Override
+    public void consume(final List<TraceSegment> data) {
+        data.forEach(traceSegment -> {
+            SegmentObject upstreamSegment = traceSegment.transform();
+            ProducerRecord<String, Bytes> record = new ProducerRecord<>(
+                topic,
+                upstreamSegment.getTraceSegmentId(),
+                Bytes.wrap(upstreamSegment.toByteArray())
+            );
+            producer.send(record, (m, e) -> {

Review comment:
       *FutureReturnValueIgnored:*  Return value of methods returning Future 
must be checked. Ignoring returned Futures suppresses exceptions thrown from 
the code that completes the Future.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to