Skip to content

HeaderPropagation: add support for hosted services #12170

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

Closed

Conversation

alefranz
Copy link
Contributor

@alefranz alefranz commented Jul 14, 2019

This is a possible solution to fix #12169, adding the ability to use a HttpClient with the HeaderPropagationMessageHandler outside of a http requests.
It also adds the ability to reuse the functionality of the HeaderPropagationMiddleware in different scenarios, for example when consuming messages from a queue, however I guess this scenario is out of scope for a middleware.

  • Extract the functionality from the Middleware to a generic Processor that can be called outside a http request.
  • changed the valueFactory to receive a headers collection instead of the HttpContext

The main issue I see with this approach is that when the processor is used directly you must take extra care as you need a different async context per request.

Addresses #12169

/cc @rynowak

@alefranz alefranz force-pushed the headerpropagation-hostedservice branch from fde063f to 8cca794 Compare July 14, 2019 19:22
@analogrelay
Copy link
Contributor

This is a pretty old draft. Where do we stand here? @alefranz @rynowak ?

@alefranz
Copy link
Contributor Author

alefranz commented Oct 6, 2019

Hi Andrew,

This has been partially addressed with #12636, as now you get a proper exception when trying to consume this from a hosted service.
From the conversation in #12169 there was no interest to extend the functionality to support the Hosted Services scenario. If this is still the case, we can close both this PR and the related issue.

Thank you.

@analogrelay
Copy link
Contributor

@alefranz I don't think we necessarily need to close the issue, but I think I will close this PR since it's gotten pretty stale and would need significant rebasing anyway. If we come to an agreement on the issue that we do want this functionality and how we want to implement it, I don't see any problem with opening a new PR with this change.

@analogrelay analogrelay closed this Oct 8, 2019
@amcasey amcasey added the area-hosting Includes Hosting label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hosting Includes Hosting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HeaderPropagation middleware: MessageHandler throws when used outside of a request
4 participants