llinder commented on a change in pull request #904: Messaging adapter
URL:
https://github.com/apache/incubator-zipkin-brave/pull/904#discussion_r285538477
##########
File path:
instrumentation/messaging/src/main/java/brave/messaging/MessagingConsumerHandler.java
##########
@@ -0,0 +1,119 @@
+package brave.messaging;
+
+import brave.Span;
+import brave.SpanCustomizer;
+import brave.Tracing;
+import brave.propagation.TraceContext;
+import brave.propagation.TraceContextOrSamplingFlags;
+import java.util.List;
+import java.util.Map;
+
+public class MessagingConsumerHandler<C, Chan, Msg>
+ extends MessagingHandler<Chan, Msg, ChannelAdapter<Chan>,
MessageAdapter<Msg>> {
+
+ static public <C, Chan, Msg> MessagingConsumerHandler<C, Chan, Msg> create(
+ C delegate,
+ MessagingTracing tracing,
+ ChannelAdapter<Chan> channelAdapter,
+ MessageConsumerAdapter<Msg> messageAdapter,
+ TraceContext.Extractor<Msg> extractor,
+ TraceContext.Injector<Msg> injector) {
+ return new MessagingConsumerHandler<>(delegate, tracing, channelAdapter,
messageAdapter,
+ extractor, injector);
+ }
+
+ public final C delegate;
+ final Tracing tracing;
+
+ public MessagingConsumerHandler(
+ C delegate,
Review comment:
Are there plans to use `delegate` inside of `MessagingConsumerHandler` in
the future? If not should it even be included here? Also curious if
implementations are expected to extend this class for most cases? So far it
looks like JMS and Kafka examples extend it. If thats the case maybe it should
be abstract to help emphasis intent?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]