llinder commented on a change in pull request #904: Messaging adapter
URL:
https://github.com/apache/incubator-zipkin-brave/pull/904#discussion_r285535679
##########
File path:
instrumentation/messaging/src/main/java/brave/messaging/MessageConsumerAdapter.java
##########
@@ -0,0 +1,20 @@
+package brave.messaging;
+
+public interface MessageConsumerAdapter<Msg> extends MessageAdapter<Msg> {
+ /**
+ * Messaging operation semantics, e.g. pull, push, send, receive, etc.
+ */
+ String operation(Msg message);
+
+ /**
+ * Message identifier, e.g. kafka record key, jms message correlation id.
+ */
+ String identifier(Msg message);
+
+ /**
+ * Removes propagation context from Message context carrier.
+ */
+ void clearPropagation(Msg message);
Review comment:
My personal preference would be to return the Message. Reasoning is that
some libraries or coding choices may prefer immutable data structures where
copying and returning a new object is required.
----------------------------------------------------------------
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]