Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context propagation #72

Open
pavolloffay opened this issue Oct 8, 2019 · 4 comments
Open

Context propagation #72

pavolloffay opened this issue Oct 8, 2019 · 4 comments
Labels
Milestone

Comments

@pavolloffay
Copy link
Member

I am creating this based on smallrye/smallrye-reactive-messaging#214

Allow in-process context propagation between handlers. The API can be used by users to propagate any objects between handlers, but It is also necessary for tracing to propagate span context object to be able to link spans in handlers:

@Incoming("data-processor-in")
@Outgoing("data-processor-out")
public CompletionStage<KafkaMessage<String, String>> send(KafkaMessage<String, String> message) {
  CompletableFuture<KafkaMessage<String, String>> future = new CompletableFuture<>();
  future.complete(KafkaMessage.ofAndTraced(message.getKey(), message.getPayload().toUpperCase(), message.getSpan()));
  return future;
}

links span from data-processor-in to data-processor-out topics.

Two solutions have been already discussed:

  • Add context object (Map<String, Object>)to the message class. Q: How would user get the context? The implementation would have to provide an SPI to initialize TLS.
  • Integrate with https://github.com/eclipse/microprofile-context-propagation - activate TLS for every user-defined handlers. The correct TLS has to be set

Once the context propagation is in place we could provide tracing for underlying messaging platforms but in addition to also model invocations of the handlers themselves.

Other

Related to #2?

@hutchig hutchig added the context label Oct 9, 2019
@Emily-Jiang
Copy link
Member

I think it is much better to integrate with context propagation as it was created to server the purpose of this spec and Fault Tolerance.

lamtrhieu pushed a commit to lamtrhieu/microprofile-reactive-messaging that referenced this issue Nov 8, 2019
Adding JsonIgnore for payload property
@pilhuhn
Copy link

pilhuhn commented Mar 16, 2020

Where do we stand here?
I think it is important to solve that rather sooner than later as any (reactive) messaging things are becoming more popular these days.

@cescoffier
Copy link
Contributor

SmallRye includes in its last version metadata propagation (metadata associated with messages) and supports context propagation (capture of the context and propagation to the subscriber).

@Emily-Jiang
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants