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

Establish the stability of the httpClient param on a Camel HTTP4 endpoint #115

Closed
ajs6f opened this issue May 12, 2017 · 10 comments
Closed
Assignees

Comments

@ajs6f
Copy link
Contributor

ajs6f commented May 12, 2017

Making this issue because the Camel documentation workflow appears to be a bit involved and I expect it to take several days at least to work through it in order to determine whether httpClient is a reliable and supported function or not.

I will find an answer to that question and bring it back to API-X.

@ajs6f
Copy link
Contributor Author

ajs6f commented May 12, 2017

Can't assign myself, @birkland -- please assign me.

@birkland
Copy link
Contributor

This annotation in HttpEndpoint is what suggests injectability of HttpClient as a param. Other than that annotation, I haven't found any mention that this mechanism was or was not stable/supported

@whikloj
Copy link
Contributor

whikloj commented May 12, 2017

Good 👀 @birkland, I saw that when working a local project, but assumed that a) a lack of documentation and b) the use of the term "producer" meant it was not for consumer endpoints.

@ajs6f
Copy link
Contributor Author

ajs6f commented May 12, 2017

  1. How did you make the googly eyes!? I need to use that all the time!
  2. My hope is that this is a documentation oversight in Camel and that the response will be "Oh, yeah, you can use that, we just forgot to note it in the docs."
  3. Even if they tell us otherwise, it might be not unreasonable for us to use this "feature" just until we can offload the pattern onto camel-toolkit, for which work I have created this issue.

@whikloj
Copy link
Contributor

whikloj commented May 12, 2017

  1. :eyes: -> 👀, :roll_eyes: -> 🙄
  2. Documentation has always been camel's weak spot
  3. If they tell us otherwise, could we use the HttpClientConfigurer to allow individuals to provide their own set of configuration for the http client? I don't fully understand this class or how it works, but it seems somewhat in line with what we want.

@ajs6f
Copy link
Contributor Author

ajs6f commented May 12, 2017

Tracking at https://issues.apache.org/jira/browse/CAMEL-11270

@birkland
Copy link
Contributor

Fantastic, thanks so much @ajs6f ! Let's hope they bite

@whikloj I'm not sure how the HttpClientConfigurer is bound to the lifecycle of a given route. If HttpClientConfigurer is invoked only once upon initial route building, then it probably can't be used. If it's invoked per message, then it probably can. I suspect it's the former, though.

@whikloj
Copy link
Contributor

whikloj commented May 12, 2017

@birkland I'd agree that it is probably per route

@ajs6f
Copy link
Contributor Author

ajs6f commented May 12, 2017

Agreed. We might be able to use it by altering the parameter in its method-- that is, swapping out the client they offer us to configure for a completely different client. But that is ugly, fugly, mugly.

@ajs6f
Copy link
Contributor Author

ajs6f commented May 13, 2017

We are golden. See the Camel issue linked above:

Claus Ibsen added a comment - 5 hours ago

Its documented in the ascii docs which is the new docs
https://github.com/apache/camel/blob/master/components/camel-http4/src/main/docs/http4-component.adoc

https://github.com/apache/camel/tree/master/components#components

We can safely use the httpClient parameter.

@ajs6f ajs6f closed this as completed May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants